Text Generation
Transformers
Safetensors
qwen3
Generated from Trainer
trl
unsloth
sft
conversational
text-generation-inference
Instructions to use Ba2han/test_CPTlsft2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ba2han/test_CPTlsft2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ba2han/test_CPTlsft2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ba2han/test_CPTlsft2") model = AutoModelForCausalLM.from_pretrained("Ba2han/test_CPTlsft2", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ba2han/test_CPTlsft2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ba2han/test_CPTlsft2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ba2han/test_CPTlsft2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ba2han/test_CPTlsft2
- SGLang
How to use Ba2han/test_CPTlsft2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Ba2han/test_CPTlsft2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ba2han/test_CPTlsft2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Ba2han/test_CPTlsft2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ba2han/test_CPTlsft2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use Ba2han/test_CPTlsft2 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ba2han/test_CPTlsft2 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ba2han/test_CPTlsft2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Ba2han/test_CPTlsft2 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Ba2han/test_CPTlsft2", max_seq_length=2048, ) - Docker Model Runner
How to use Ba2han/test_CPTlsft2 with Docker Model Runner:
docker model run hf.co/Ba2han/test_CPTlsft2
Training in progress, step 359, checkpoint
Browse files- last-checkpoint/config.json +3 -3
- last-checkpoint/generation_config.json +1 -1
- last-checkpoint/model.safetensors +1 -1
- last-checkpoint/optimizer.pt +2 -2
- last-checkpoint/scheduler.pt +1 -1
- last-checkpoint/tokenizer.json +1 -1
- last-checkpoint/tokenizer_config.json +1 -5
- last-checkpoint/trainer_state.json +0 -0
- last-checkpoint/training_args.bin +1 -1
last-checkpoint/config.json
CHANGED
|
@@ -56,7 +56,7 @@
|
|
| 56 |
],
|
| 57 |
"max_position_embeddings": 16384,
|
| 58 |
"max_window_layers": 40,
|
| 59 |
-
"model_name": "
|
| 60 |
"model_type": "qwen3",
|
| 61 |
"num_attention_heads": 16,
|
| 62 |
"num_hidden_layers": 40,
|
|
@@ -69,8 +69,8 @@
|
|
| 69 |
},
|
| 70 |
"sliding_window": null,
|
| 71 |
"tie_word_embeddings": true,
|
| 72 |
-
"transformers_version": "5.
|
| 73 |
-
"unsloth_version": "2026.8.
|
| 74 |
"use_cache": false,
|
| 75 |
"use_sliding_window": false,
|
| 76 |
"vocab_size": 60802
|
|
|
|
| 56 |
],
|
| 57 |
"max_position_embeddings": 16384,
|
| 58 |
"max_window_layers": 40,
|
| 59 |
+
"model_name": "Ba2han/test_CPTl",
|
| 60 |
"model_type": "qwen3",
|
| 61 |
"num_attention_heads": 16,
|
| 62 |
"num_hidden_layers": 40,
|
|
|
|
| 69 |
},
|
| 70 |
"sliding_window": null,
|
| 71 |
"tie_word_embeddings": true,
|
| 72 |
+
"transformers_version": "5.14.1",
|
| 73 |
+
"unsloth_version": "2026.8.4",
|
| 74 |
"use_cache": false,
|
| 75 |
"use_sliding_window": false,
|
| 76 |
"vocab_size": 60802
|
last-checkpoint/generation_config.json
CHANGED
|
@@ -8,6 +8,6 @@
|
|
| 8 |
"output_attentions": false,
|
| 9 |
"output_hidden_states": false,
|
| 10 |
"pad_token_id": 0,
|
| 11 |
-
"transformers_version": "5.
|
| 12 |
"use_cache": false
|
| 13 |
}
|
|
|
|
| 8 |
"output_attentions": false,
|
| 9 |
"output_hidden_states": false,
|
| 10 |
"pad_token_id": 0,
|
| 11 |
+
"transformers_version": "5.14.1",
|
| 12 |
"use_cache": false
|
| 13 |
}
|
last-checkpoint/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2934397032
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1cf89c40bf12b0ae068ccd3c77499f256c0bb8be5d17010124d7185885f58ff8
|
| 3 |
size 2934397032
|
last-checkpoint/optimizer.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:68f585ebc96f25b1202640a2aa0898d84adc82670b03813bab892643b156c624
|
| 3 |
+
size 1474576440
|
last-checkpoint/scheduler.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9785
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:104c3fbf3c321994c619d8c4771921dc4f8440dbfb44f110518116de11f7cc63
|
| 3 |
size 9785
|
last-checkpoint/tokenizer.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
-
"max_length":
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
|
|
|
| 2 |
"version": "1.0",
|
| 3 |
"truncation": {
|
| 4 |
"direction": "Right",
|
| 5 |
+
"max_length": 2560,
|
| 6 |
"strategy": "LongestFirst",
|
| 7 |
"stride": 0
|
| 8 |
},
|
last-checkpoint/tokenizer_config.json
CHANGED
|
@@ -6,16 +6,12 @@
|
|
| 6 |
"extra_special_tokens": [
|
| 7 |
"<|im_start|>"
|
| 8 |
],
|
| 9 |
-
"is_local":
|
| 10 |
"local_files_only": false,
|
| 11 |
-
"max_length": 2048,
|
| 12 |
"model_max_length": 1000000000000000019884624838656,
|
| 13 |
"pad_token": "<pad>",
|
| 14 |
"padding_side": "right",
|
| 15 |
-
"stride": 0,
|
| 16 |
"tokenizer_class": "TokenizersBackend",
|
| 17 |
-
"truncation_side": "right",
|
| 18 |
-
"truncation_strategy": "longest_first",
|
| 19 |
"unk_token": "<unk>",
|
| 20 |
"added_tokens_decoder": {
|
| 21 |
"0": {
|
|
|
|
| 6 |
"extra_special_tokens": [
|
| 7 |
"<|im_start|>"
|
| 8 |
],
|
| 9 |
+
"is_local": false,
|
| 10 |
"local_files_only": false,
|
|
|
|
| 11 |
"model_max_length": 1000000000000000019884624838656,
|
| 12 |
"pad_token": "<pad>",
|
| 13 |
"padding_side": "right",
|
|
|
|
| 14 |
"tokenizer_class": "TokenizersBackend",
|
|
|
|
|
|
|
| 15 |
"unk_token": "<unk>",
|
| 16 |
"added_tokens_decoder": {
|
| 17 |
"0": {
|
last-checkpoint/trainer_state.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
last-checkpoint/training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5777
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0f634d41cc4d3072ce614e087d770fe4270471a62f64f5458138c47f794068d
|
| 3 |
size 5777
|