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
Downloads last month
388
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Nanthasit/sakthai-context-7b-merged

Base model

Qwen/Qwen2.5-7B
Adapter
(2363)
this model
Adapters
1 model

Dataset used to train Nanthasit/sakthai-context-7b-merged

Space using Nanthasit/sakthai-context-7b-merged 1

Collection including Nanthasit/sakthai-context-7b-merged

Evaluation results

  • Overall Pass Rate (8/8) on SakThai Workbench Eval
    self-reported
    100.000