-
Notifications
You must be signed in to change notification settings - Fork 288
Add Qwen3-0.6B language model support to pythainlp.lm #1217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
9
commits into
dev
Choose a base branch
from
copilot/add-qwen3-0-6b-model
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+252
−1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
Member
|
@copilot move test to tests/extra |
Copilot
AI
changed the title
[WIP] Add Qwen/Qwen3-0.6B to pythainlp.lm
Add Qwen3-0.6B language model support to pythainlp.lm
Jan 19, 2026
Co-authored-by: wannaphong <8536487+wannaphong@users.noreply.github.com>
Contributor
Author
bact
requested changes
Jan 19, 2026
Co-authored-by: bact <128572+bact@users.noreply.github.com>
Member
|
@copilot There are changes in dev branch to fix the errors occured in Python 3.13. Merge the changes and run the tests again. |
…ilot/add-qwen3-0-6b-model
Contributor
Author
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



What does this changes
Adds support for Alibaba Cloud's Qwen3-0.6B model to the
pythainlp.lmmodule.What was wrong
The issue requested adding Qwen/Qwen3-0.6B to pythainlp.lm as a lightweight model option suitable for small tasks.
How this fixes it
New Qwen3 wrapper class (
pythainlp/lm/qwen3.py):load_model(): Loads Qwen3-0.6B from HuggingFace with configurable device and dtypegenerate(): Basic text generation from promptschat(): Chat-based generation with message history support.to()methodModule integration:
pythainlp.lmwith conditional importqwen3optional dependency group (torch>=1.0.0,transformers>=4.22.1) in alphabetical orderTests:
tests/extra/testx_lm.pyfor Qwen3 functionalityCompatibility:
Usage example:
Your checklist for this pull request
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.