Text Generation
Transformers
Safetensors
English
qwen2
agent
conversational
ollama
small-language-model
slm
tool-use
qwen
qwen2.5
sakthai
house-of-sak
tool-calling
function-calling
merged
edge
lightweight
low-resource
raspberry-pi
on-device
benchmark
eval
Eval Results (legacy)
Eval Results
text-generation-inference
Instructions to use Nanthasit/sakthai-context-0.5b-tools with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Nanthasit/sakthai-context-0.5b-tools with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Nanthasit/sakthai-context-0.5b-tools") 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-context-0.5b-tools") model = AutoModelForCausalLM.from_pretrained("Nanthasit/sakthai-context-0.5b-tools", 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-context-0.5b-tools with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Nanthasit/sakthai-context-0.5b-tools" # 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-context-0.5b-tools", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Nanthasit/sakthai-context-0.5b-tools
- SGLang
How to use Nanthasit/sakthai-context-0.5b-tools 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-context-0.5b-tools" \ --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-context-0.5b-tools", "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-context-0.5b-tools" \ --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-context-0.5b-tools", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Nanthasit/sakthai-context-0.5b-tools with Docker Model Runner:
docker model run hf.co/Nanthasit/sakthai-context-0.5b-tools
Remove unearned model-index claims; state measured results or mark as unbenchmarked
Browse files
README.md
CHANGED
|
@@ -24,20 +24,6 @@ datasets:
|
|
| 24 |
- Nanthasit/sakthai-irrelevance-supplement
|
| 25 |
metrics:
|
| 26 |
- accuracy
|
| 27 |
-
model-index:
|
| 28 |
-
- name: sakthai-context-0.5b-tools
|
| 29 |
-
results:
|
| 30 |
-
- task:
|
| 31 |
-
type: text-generation
|
| 32 |
-
name: Tool-Calling
|
| 33 |
-
dataset:
|
| 34 |
-
name: sakthai-combined-v6
|
| 35 |
-
type: Nanthasit/sakthai-combined-v6
|
| 36 |
-
metrics:
|
| 37 |
-
- type: accuracy
|
| 38 |
-
value: 0.8
|
| 39 |
-
name: Score (4/5)
|
| 40 |
-
verified: true
|
| 41 |
---
|
| 42 |
|
| 43 |
<h1 align="center">SakThai 0.5B — Tools (LoRA)</h1>
|
|
@@ -168,3 +154,28 @@ These models are new or specialised — downloads are low but they're production
|
|
| 168 |
## License
|
| 169 |
|
| 170 |
Apache 2.0 (following the Qwen2.5 base model license).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
- Nanthasit/sakthai-irrelevance-supplement
|
| 25 |
metrics:
|
| 26 |
- accuracy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
---
|
| 28 |
|
| 29 |
<h1 align="center">SakThai 0.5B — Tools (LoRA)</h1>
|
|
|
|
| 154 |
## License
|
| 155 |
|
| 156 |
Apache 2.0 (following the Qwen2.5 base model license).
|
| 157 |
+
|
| 158 |
+
## Evaluation
|
| 159 |
+
|
| 160 |
+
Measured on [sakthai-bench-v1](https://huggingface.co/datasets/Nanthasit/sakthai-bench-v1)
|
| 161 |
+
(235 rows, balanced; full per-category results archived in that repo under `results/`):
|
| 162 |
+
|
| 163 |
+
| category | selection |
|
| 164 |
+
|---|---:|
|
| 165 |
+
| simple | 1/70 — 1.4% |
|
| 166 |
+
| parallel | 1/70 — 1.4% |
|
| 167 |
+
| irrelevance (tools offered) | 63/70 — 90.0% |
|
| 168 |
+
| irrelevance (no tools) | 25/25 — 100% |
|
| 169 |
+
| **overall** | **38.3%** |
|
| 170 |
+
|
| 171 |
+
**Read this honestly: this model rarely calls tools.** It reliably declines when no
|
| 172 |
+
tool applies, but on requests that need one it usually replies in prose instead of
|
| 173 |
+
emitting a `<tool_call>`. Its format is correct when it does fire, so this is a
|
| 174 |
+
training-signal limitation rather than a parsing problem.
|
| 175 |
+
|
| 176 |
+
A previous version of this card claimed a tool-calling score of 4/5 (0.80). That
|
| 177 |
+
figure came from a five-example internal spot check, not from a benchmark, and the
|
| 178 |
+
measurement above contradicts it. It has been removed.
|
| 179 |
+
|
| 180 |
+
A fix is in progress — prompt-masked training scores 89.8% selection on the same
|
| 181 |
+
benchmark — and this card will be updated when a replacement is promoted.
|