Instructions to use Nanthasit/sakthai-context-1.5b-tools with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Nanthasit/sakthai-context-1.5b-tools with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "Nanthasit/sakthai-context-1.5b-tools") - Notebooks
- Google Colab
- Kaggle
SakThai 1.5B Tools β LoRA Adapter
PEFT LoRA adapter for tool-calling fine-tuned on Qwen2.5-1.5B-Instruct using the SakThai combined dataset. Apply this adapter to the base model for structured function-calling capabilities.
Usage
Loading with PEFT
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-1.5B-Instruct",
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "Nanthasit/sakthai-context-1.5b-tools")
Merging into Full Weights
To create a single merged checkpoint (no PEFT dependency):
git clone https://huggingface.co/Nanthasit/sakthai-context-1.5b-tools
python -m peft merge \
--base_model_name_or_path Qwen/Qwen2.5-1.5B-Instruct \
--peft_model_path ./sakthai-context-1.5b-tools \
--output_dir ./merged-1.5b-tools
The merged version is available as sakthai-context-1.5b-merged.
Best Prompt for Tool-Calling
For best results, use the <tools> XML block format:
System: You are a function-calling assistant.
Temperature: 0.01
Format: <tools><tool>name(params)</tool></tools>
Example:
<tools>
<tool>get_weather(location: "Bangkok")</tool>
</tools>
Without the <tools> block, the model answers questions directly instead of calling functions.
Training
| Detail | Value |
|---|---|
| Method | QLoRA (4-bit) |
| Base model | Qwen/Qwen2.5-1.5B-Instruct |
| Rank | 16 |
| Alpha | 32 |
| Dataset | sakthai-combined-v6 β 2,003 examples |
| Format | ChatML with tool schemas |
| Context | 32K tokens |
Merged Versions
| Size | Link |
|---|---|
| 1.5B merged | sakthai-context-1.5b-merged |
| 7B tools | sakthai-context-7b-tools |
| 0.5B tools | sakthai-context-0.5b-tools |
Pipeline Integration
This model is the 1.5B tool-calling adapter layer of the SakThai pipeline. Here's how it connects to the family:
Base Model (Qwen2.5-1.5B-Instruct)
β PEFT LoRA fine-tune
sakthai-context-1.5b-tools β You are here
β merge_and_unload()
sakthai-context-1.5b-merged (the merged GGUF, the family's flagship model)
β shared memory (~/.sakthai)
SakThai Agent (@sakthai_agent_bot) β Main Lead, runs DeepSeek V4 Flash
SakKing Agent (@sakking_agent_bot) β Runner, runs the same backend
Upstream: The adapter is trained on sakthai-combined-v6 (2,003 tool-calling examples) using QLoRA on Qwen2.5-1.5B-Instruct.
Downstream: The merged version (context-1.5b-merged) is the most popular model in the family (1,197+ downloads) and can be loaded directly in llama.cpp with the <tool> prompt format.
Sibling adapters: 7B-Tools (185 dl) provides a more capable tool-calling variant, while 0.5B-Tools covers the ultra-lightweight edge.
Ecosystem role: Powers the Sak-Family-Agent tool-calling stack. The <tool> XML format used here is what every agent in the family reads and writes β the structured function-calling dialect that turns a general-purpose LLM into an agent.
SakThai Model Family
| Model | Size | Type | Downloads |
|---|---|---|---|
| 1.5B-merged | 934 MB | Tool-calling GGUF | 1,197 |
| 0.5B-merged | 380 MB | Lightweight GGUF | 994 |
| 7B-merged | 15 GB | Full-size model | 562 |
| 7B-128K | 15 GB | Extended context | 351 |
| 7B-Tools (LoRA) | 1.2 GB | Tool-calling adapter | 185 |
| 1.5B-Tools (LoRA) | 427 MB | Tool-calling adapter | 143 β¬ οΈ |
| Coder-1.5B | 1.1 GB | Code GGUF | 34 |
| Vision-7B | 3.9 GB | Multimodal GGUF | 45 |
| TTS-Model | 141 MB | Speech GGUF | 33 |
| Multilingual Embedding | 80 MB | 50+ languages | 104 |
| SakThai Embedding | β | Sentence Similarity | π |
| 0.5B-Tools (LoRA) | β | Tool-calling adapter | π |
- Downloads last month
- 163