Text Generation
Transformers
Safetensors
English
qwen2
qwen2.5
sakthai
house-of-sak
tool-calling
function-calling
agent
instruct
finetuned
sft
merged
conversational
assistant
cpu-inference
rsLoRA
benchmark
Eval Results
llama-cpp
Eval Results (legacy)
text-generation-inference
Instructions to use Nanthasit/sakthai-plus-1.5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Nanthasit/sakthai-plus-1.5b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Nanthasit/sakthai-plus-1.5b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Nanthasit/sakthai-plus-1.5b") model = AutoModelForCausalLM.from_pretrained("Nanthasit/sakthai-plus-1.5b", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Nanthasit/sakthai-plus-1.5b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Nanthasit/sakthai-plus-1.5b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nanthasit/sakthai-plus-1.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Nanthasit/sakthai-plus-1.5b
- SGLang
How to use Nanthasit/sakthai-plus-1.5b 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 "Nanthasit/sakthai-plus-1.5b" \ --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": "Nanthasit/sakthai-plus-1.5b", "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 "Nanthasit/sakthai-plus-1.5b" \ --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": "Nanthasit/sakthai-plus-1.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Nanthasit/sakthai-plus-1.5b with Docker Model Runner:
docker model run hf.co/Nanthasit/sakthai-plus-1.5b
Upload Qwen2ForCausalLM
Browse files- README.md +62 -73
- config.json +4 -7
- generation_config.json +1 -1
- model.safetensors +2 -2
README.md
CHANGED
|
@@ -33,83 +33,72 @@ inference:
|
|
| 33 |
max_new_tokens: 256
|
| 34 |
top_p: 0.9
|
| 35 |
widget:
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
- task:
|
| 46 |
-
type: text-generation
|
| 47 |
-
name: Tool-Calling Accuracy
|
| 48 |
-
dataset:
|
| 49 |
-
type: custom
|
| 50 |
-
name: llama.cpp tool-calling (3-trial, q4_k_m)
|
| 51 |
-
metrics:
|
| 52 |
-
- type: tool_call_success
|
| 53 |
-
value: 1.0
|
| 54 |
-
name: Tool Call Success Rate
|
| 55 |
-
verified: true
|
| 56 |
-
- type: valid-json
|
| 57 |
-
value: 1.0
|
| 58 |
-
name: Valid JSON Arguments
|
| 59 |
-
verified: true
|
| 60 |
-
- type: correct-answer
|
| 61 |
-
value: 1.0
|
| 62 |
-
name: Correct Answer Rate
|
| 63 |
-
verified: true
|
| 64 |
-
- task:
|
| 65 |
-
type: text-generation
|
| 66 |
-
name: SakThai Bench v2 — Tool Selection
|
| 67 |
-
dataset:
|
| 68 |
-
type: custom
|
| 69 |
-
name: sakthai-bench-v2
|
| 70 |
-
metrics:
|
| 71 |
-
- type: selection-accuracy
|
| 72 |
-
value: 84.8
|
| 73 |
-
name: Selection Accuracy
|
| 74 |
-
verified: false
|
| 75 |
-
- type: arguments-accuracy
|
| 76 |
-
value: 33.7
|
| 77 |
-
name: Arguments Accuracy
|
| 78 |
-
verified: false
|
| 79 |
-
- type: strict-accuracy
|
| 80 |
-
value: 33.7
|
| 81 |
-
name: Strict Accuracy
|
| 82 |
-
verified: false
|
| 83 |
-
- task:
|
| 84 |
-
type: text-generation
|
| 85 |
-
name: Commonsense Reasoning
|
| 86 |
-
dataset:
|
| 87 |
-
type: lighteval
|
| 88 |
-
name: lighteval
|
| 89 |
-
metrics:
|
| 90 |
-
- type: winogrande
|
| 91 |
-
value: 59.6
|
| 92 |
-
name: WinoGrande (WSC)
|
| 93 |
-
verified: false
|
| 94 |
-
- type: hellaswag
|
| 95 |
-
value: 34.0
|
| 96 |
-
name: HellaSwag
|
| 97 |
-
verified: false
|
| 98 |
-
- task:
|
| 99 |
-
type: text-generation
|
| 100 |
-
name: Math Reasoning
|
| 101 |
-
dataset:
|
| 102 |
-
type: lighteval
|
| 103 |
-
name: lighteval
|
| 104 |
-
metrics:
|
| 105 |
-
- type: gsm8k
|
| 106 |
-
value: 50.9
|
| 107 |
-
name: GSM8K
|
| 108 |
-
verified: false
|
| 109 |
extra:
|
| 110 |
downloads: 297
|
| 111 |
likes: 0
|
| 112 |
last_modified: 2026-08-01 07:31:41+00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
---
|
| 114 |
|
| 115 |
<p align="center">
|
|
|
|
| 33 |
max_new_tokens: 256
|
| 34 |
top_p: 0.9
|
| 35 |
widget:
|
| 36 |
+
- text: Send an email to Beer with the subject 'Status update' and body 'The model
|
| 37 |
+
is running well.'
|
| 38 |
+
output:
|
| 39 |
+
text: '<tool_call>{''name'': ''send_email'', ''arguments'': {''to'': ''Beer'',
|
| 40 |
+
''subject'': ''Status update'', ''body'': ''The model is running well.''}}'
|
| 41 |
+
- text: What's the weather in Bangkok?
|
| 42 |
+
output:
|
| 43 |
+
text: '<tool_call>{''name'': ''get_weather'', ''arguments'': {''location'':
|
| 44 |
+
''Bangkok''}}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
extra:
|
| 46 |
downloads: 297
|
| 47 |
likes: 0
|
| 48 |
last_modified: 2026-08-01 07:31:41+00:00
|
| 49 |
+
model-index:
|
| 50 |
+
- name: sakthai-plus-1.5b
|
| 51 |
+
results:
|
| 52 |
+
- task:
|
| 53 |
+
type: text-generation
|
| 54 |
+
name: Tool-Calling Accuracy
|
| 55 |
+
dataset:
|
| 56 |
+
name: llama.cpp tool-calling (3-trial, q4_k_m)
|
| 57 |
+
type: custom
|
| 58 |
+
metrics:
|
| 59 |
+
- type: tool_call_success
|
| 60 |
+
value: 1.0
|
| 61 |
+
name: Tool Call Success Rate
|
| 62 |
+
verified: true
|
| 63 |
+
- type: valid-json
|
| 64 |
+
value: 1.0
|
| 65 |
+
name: Valid JSON Arguments
|
| 66 |
+
verified: true
|
| 67 |
+
- type: correct-answer
|
| 68 |
+
value: 1.0
|
| 69 |
+
name: Correct Answer Rate
|
| 70 |
+
verified: true
|
| 71 |
+
- type: selection-accuracy
|
| 72 |
+
value: 84.8
|
| 73 |
+
name: Selection Accuracy
|
| 74 |
+
verified: false
|
| 75 |
+
- type: arguments-accuracy
|
| 76 |
+
value: 33.7
|
| 77 |
+
name: Arguments Accuracy
|
| 78 |
+
verified: false
|
| 79 |
+
- type: strict-accuracy
|
| 80 |
+
value: 33.7
|
| 81 |
+
name: Strict Accuracy
|
| 82 |
+
verified: false
|
| 83 |
+
- task:
|
| 84 |
+
type: text-generation
|
| 85 |
+
name: Commonsense Reasoning
|
| 86 |
+
dataset:
|
| 87 |
+
name: lighteval
|
| 88 |
+
type: lighteval
|
| 89 |
+
metrics:
|
| 90 |
+
- type: winogrande
|
| 91 |
+
value: 59.6
|
| 92 |
+
name: WinoGrande (WSC)
|
| 93 |
+
verified: false
|
| 94 |
+
- type: hellaswag
|
| 95 |
+
value: 34.0
|
| 96 |
+
name: HellaSwag
|
| 97 |
+
verified: false
|
| 98 |
+
- type: gsm8k
|
| 99 |
+
value: 50.9
|
| 100 |
+
name: GSM8K
|
| 101 |
+
verified: false
|
| 102 |
---
|
| 103 |
|
| 104 |
<p align="center">
|
config.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
],
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
"bos_token_id": 151643,
|
| 7 |
-
"dtype": "
|
| 8 |
"eos_token_id": 151645,
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 1536,
|
|
@@ -46,15 +46,12 @@
|
|
| 46 |
"num_attention_heads": 12,
|
| 47 |
"num_hidden_layers": 28,
|
| 48 |
"num_key_value_heads": 2,
|
| 49 |
-
"pad_token_id": null,
|
| 50 |
"rms_norm_eps": 1e-06,
|
| 51 |
-
"
|
| 52 |
-
|
| 53 |
-
"rope_type": "default"
|
| 54 |
-
},
|
| 55 |
"sliding_window": null,
|
| 56 |
"tie_word_embeddings": true,
|
| 57 |
-
"transformers_version": "
|
| 58 |
"use_cache": true,
|
| 59 |
"use_sliding_window": false,
|
| 60 |
"vocab_size": 151936
|
|
|
|
| 4 |
],
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
"bos_token_id": 151643,
|
| 7 |
+
"dtype": "float16",
|
| 8 |
"eos_token_id": 151645,
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 1536,
|
|
|
|
| 46 |
"num_attention_heads": 12,
|
| 47 |
"num_hidden_layers": 28,
|
| 48 |
"num_key_value_heads": 2,
|
|
|
|
| 49 |
"rms_norm_eps": 1e-06,
|
| 50 |
+
"rope_scaling": null,
|
| 51 |
+
"rope_theta": 1000000.0,
|
|
|
|
|
|
|
| 52 |
"sliding_window": null,
|
| 53 |
"tie_word_embeddings": true,
|
| 54 |
+
"transformers_version": "4.57.6",
|
| 55 |
"use_cache": true,
|
| 56 |
"use_sliding_window": false,
|
| 57 |
"vocab_size": 151936
|
generation_config.json
CHANGED
|
@@ -10,5 +10,5 @@
|
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 20,
|
| 12 |
"top_p": 0.8,
|
| 13 |
-
"transformers_version": "
|
| 14 |
}
|
|
|
|
| 10 |
"temperature": 0.7,
|
| 11 |
"top_k": 20,
|
| 12 |
"top_p": 0.8,
|
| 13 |
+
"transformers_version": "4.57.6"
|
| 14 |
}
|
model.safetensors
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:a420583b0ad672a239a905b49d3e208e031104c486c43c31a892ac1f6399b639
|
| 3 |
+
size 3087466808
|