Model: Nanthasit/sakthai-context-7b-merged Source: Original Platform
license, language, library_name, pipeline_tag, tags, datasets, base_model, model-index
| license | language | library_name | pipeline_tag | tags | datasets | base_model | model-index | |||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| apache-2.0 |
|
transformers | text-generation |
|
|
Qwen/Qwen2.5-7B-Instruct |
|
SakThai Context 7B — Merged Model
The best-performing model in the SakThai Context family. A full-parameter merged checkpoint of Qwen2.5-7B-Instruct with LoRA adapters fine-tuned for structured tool-calling and instruction following.
LoRA adapter: Nanthasit/sakthai-context-7b-tools
Training data: Nanthasit/sakthai-combined-v5
Model Details
| Property | Value |
|---|---|
| Developed by | Nanthasit |
| Base model | Qwen/Qwen2.5-7B-Instruct |
| Parameters | 7.6B |
| Architecture | Qwen2.5 decoder-only transformer |
| Precision | BF16 |
| Fine-tuning method | LoRA → merged (rank=16, alpha=32, target=q/k/v/o/gate/up/down) |
| License | Apache 2.0 |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"Nanthasit/sakthai-context-7b-merged",
torch_dtype="bfloat16",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Nanthasit/sakthai-context-7b-merged")
messages = [{"role": "user", "content": "What's the weather like in Bangkok?"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Tool Calling
The model supports structured tool-calling via Qwen2.5's tokenizer tool schema:
messages = [
{"role": "system", "content": "You are a helpful assistant with access to tools."},
{"role": "user", "content": "What's the weather in Bangkok?"}
]
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather",
"parameters": {"type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"]}
}
}
]
text = tokenizer.apply_chat_template(messages, tools=tools, tokenize=False, add_generation_prompt=True)
Evaluation Results
Tested on a Tesla T4 (5.56 GB VRAM) via Hugging Face Jobs:
| Category | Result |
|---|---|
| Basic Response | ✅ 1/1 |
| Context Recall | ✅ 1/1 |
| Factual Accuracy | ✅ 1/1 |
| Instruction Following | ✅ 1/1 |
| JSON Output | ✅ 1/1 |
| Multi-turn | ✅ 1/1 |
| Name Recognition | ✅ 1/1 |
| Tool Calling | ✅ 1/1 |
| Overall | ✅ 8/8 (100%) |
Model load time: 137s on T4
Full eval report: eval/workbench-7b-2026-07-07.json
Smaller Variants
| Model | Size | Description |
|---|---|---|
| ⭐ sakthai-context-1.5b-merged | 1.5B | Balanced size/quality |
| ⭐ sakthai-context-0.5b-merged | 0.5B | Lightweight for edge/CPU |
Files
| File | Description |
|---|---|
model.safetensors |
Merged BF16 weights (13.8 GB) |
config.json |
Model configuration |
tokenizer.json / tokenizer_config.json |
Qwen2.5 tokenizer with chat template |
generation_config.json |
Default generation parameters |
eval/ |
Workbench evaluation scripts and results |
Description
Languages
Python
100%