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)# 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=40) 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
SakThai Plus 1.5B
House of Sak — enhanced tool-calling instruct model, fine-tuned from Qwen2.5-1.5B-Instruct with rsLoRA and merged to full weight.
Model Description
SakThai Plus 1.5B is a rsLoRA-merged instruction-tuned model for tool calling and agentic workflows. It builds on the SakThai Context lineage with improved tool-use precision, conversational grounding, and instruction adherence.
- Base model: Qwen/Qwen2.5-1.5B-Instruct
- Fine-tuning: Full-parameter merge of rsLoRA adapters trained on curated tool-calling datasets
- Architecture: Qwen2ForCausalLM — 28 layers, 12 attention heads, 2 KV heads, hidden size 1536, intermediate 8960
- Parameters: ~1.54B (bf16, 2.88 GiB on disk)
- Format: Qwen2.5 chat template (standard)
- Context length: 32K tokens (max_position_embeddings: 32768)
- License: Apache 2.0
Intended Use
- Tool/function calling agents and assistants
- Conversational AI with structured output generation
- Lightweight on-device agent deployments (CPU-friendly at 1.5B)
- Prototyping agentic workflows before scaling to larger models
Training Data
The model was fine-tuned on a curated mixture of:
| Dataset | Rows | Description |
|---|---|---|
| Nanthasit/sakthai-combined-v7 | 2,309 | Multi-source tool-calling examples (subset of v10) |
| Nanthasit/SimpleToolCalling | 2,002 | Structured function-calling examples |
Training method: rsLoRA (rank-stabilized) via TRL SFTTrainer, merged to full weights.
| Hyperparameter | Value |
|---|---|
| r / alpha / dropout | 16 / 32 / 0.05 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj (all 7 linear) |
| Optimizer | AdamW (8-bit) |
| Learning rate | 2e-4 |
| Epochs | 3 |
| Precision | bf16 |
| Hardware | Free T4 GPU (Kaggle / Colab / HF Inference), $0 budget |
Performance
Benchmark results across tool-calling, reasoning, and math tasks:
| Task | Metric | Score | Verified | Source |
|---|---|---|---|---|
| Tool Calling (send_email) | Success Rate | 1.0 (3/3) | ✅ Yes | llama.cpp 3-trial |
| Tool Calling | Valid JSON Args | 1.0 (3/3) | ✅ Yes | llama.cpp 3-trial |
| Tool Calling | Correct Answer | 1.0 (3/3) | ✅ Yes | llama.cpp 3-trial |
| Tool Selection (v2) | Selection Accuracy | 84.8% | ❌ No | sakthai-bench-v2 |
| Tool Selection (v2) | Arguments Accuracy | 33.7% | ❌ No | sakthai-bench-v2 |
| Tool Selection (v2) | Strict Accuracy | 33.7% | ❌ No | sakthai-bench-v2 |
| WinoGrande (WSC) | Accuracy | 59.6% | ❌ No | lighteval |
| HellaSwag | Accuracy | 34.0% | ❌ No | lighteval |
| GSM8K (Math) | Accuracy | 50.9% | ❌ No | lighteval |
Key takeaways:
- Tool calling performs reliably — 3/3 on every trial in the verified
send_emailscenario. The model correctly formats<tool_call>XML with valid JSON arguments. - Tool selection is strong (84.8% selection accuracy on sakthai-bench-v2) but argument precision needs refinement (33.7% strict).
- Commonsense and math scores reflect the base Qwen2.5-1.5B-Instruct capabilities with minor degradation from tool-calling specialization.
⚠ Unverified scores are single-trial results from
.eval_results/. Multi-trial replication is planned. The 3-trial tool-calling benchmark is the only verified result.
Quick Start
Python — Direct Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Nanthasit/sakthai-plus-1.5b"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
messages = [
{"role": "system", "content": "You are a helpful assistant with tool-calling capabilities."},
{"role": "user", "content": "What's the weather in Bangkok?"}
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt")
outputs = model.generate(inputs, max_new_tokens=256, temperature=0.3, do_sample=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Expected output format:
<tool_call>{'name': 'get_weather', 'arguments': {'location': 'Bangkok'}}</tool_call>
Python — Tool-Calling with Multiple Tools
This model uses the <tool_call> XML dialect (v2 format). Provide tool definitions in the system prompt:
messages = [
{"role": "system", "content": """You have access to these tools:
- get_weather(location: str) — get weather for a city
- send_email(to: str, subject: str, body: str) — send an email
- search_web(query: str) — search the internet
Respond with the appropriate tool call in <tool_call> XML format."""},
{"role": "user", "content": "Send an email to Beer with the subject 'Status update' and body 'The model is running well.'"}
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt")
outputs = model.generate(inputs, max_new_tokens=256, temperature=0.3, do_sample=True)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
# Extracts: <tool_call>{'name': 'send_email', 'arguments': {...}}</tool_call>
llama.cpp / Ollama (GGUF)
For CPU inference, use the llama.cpp compatible GGUF version or convert manually:
# Convert to GGUF via llama.cpp
git clone https://github.com/ggml-ai/llama.cpp
cd llama.cpp
python3 convert_hf_to_gguf.py Nanthasit/sakthai-plus-1.5b --outfile sakthai-plus-1.5b-f16.gguf
# Run with llama-cli
./llama-cli -m sakthai-plus-1.5b-f16.gguf \
-p "<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n<|im_start|>user\nWhat's the weather in Bangkok?<|im_end|>\n<|im_start|>assistant\n" \
-no-cnv --simple-io -n 256 -t 2
Model Family
This model is part of the SakThai Model Family — 25 models across sizes and specializations:
| Variant | Type | Description |
|---|---|---|
| sakthai-plus-1.5b | ✅ This | Merged instruct, tool calling |
| sakthai-plus-1.5b-lora | LoRA adapter | Lightweight adapter for the same base |
| sakthai-plus-1.5b-coder | Skeleton | Code-specialized variant (base: Qwen2.5-Coder-1.5B) |
| sakthai-context-1.5b-tools-v2 | Model | Improved tool-use variant |
| sakthai-context-1.5b-merged-v2 | Model | Full weights, merged from v2 LoRA |
| Family size | 25 public models across merged, LoRA, vision, embedding, TTS, and coder variants | |
| Current downloads | 244 | |
| Last updated | 2026-07-31 | |
| View full collection → |
Limitations
- Language: Optimized for English tool-calling scenarios. Multilingual prompts may degrade performance.
- Knowledge cutoff: The base Qwen2.5-1.5B-Instruct has a knowledge cutoff of ~2024. The fine-tuning dataset (2025–2026 tool-calling examples) does not expand world knowledge.
- Argument precision: sakthai-bench-v2 shows 84.8% selection accuracy but only 33.7% strict accuracy — the model often selects the right tool but generates malformed arguments.
- Hallucination risk: Like all language models, it may generate plausible-sounding but incorrect tool arguments. Always validate tool calls before execution in production.
- Not a general reasoning model: Benchmarks on commonsense (HellaSwag 34.0%, WinoGrande 59.6%) are below larger models. This is a tool-calling specialist, not a general-purpose reasoner.
- Unverified benchmarks: 8 of 9 metric entries are single-trial and unverified. Verified scores (3/3 tool-calling) were measured on llama.cpp q4_k_m (CPU, 2 threads).
- Free-tier constraints: Trained entirely on free T4 GPU credits. No production-grade training infra was used.
Citation
@misc{sakthai-plus-1.5b,
author = {Burankum, Nanthasit},
title = {SakThai Plus 1.5B: Enhanced Tool-Calling Language Model},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/Nanthasit/sakthai-plus-1.5b
note = {Fine-tuned from Qwen2.5-1.5B-Instruct with rsLoRA}
}
License
Apache 2.0
- Downloads last month
- 244
Model tree for Nanthasit/sakthai-plus-1.5b
Datasets used to train Nanthasit/sakthai-plus-1.5b
Nanthasit/SimpleToolCalling
Space using Nanthasit/sakthai-plus-1.5b 1
Collection including Nanthasit/sakthai-plus-1.5b
Evaluation results
- Tool Call Success Rate on llama.cpp tool-calling (3-trial, q4_k_m)self-reported1.000
- Valid JSON Arguments on llama.cpp tool-calling (3-trial, q4_k_m)self-reported1.000
- Correct Answer Rate on llama.cpp tool-calling (3-trial, q4_k_m)self-reported1.000
- Selection Accuracy on sakthai-bench-v2self-reported84.800
- Arguments Accuracy on sakthai-bench-v2self-reported33.700
- Strict Accuracy on sakthai-bench-v2self-reported33.700
- WinoGrande (WSC) on lightevalself-reported59.600
- HellaSwag on lightevalself-reported34.000