SakThai Context 1.5B merged v2 🧠

Merged full-model tool-calling · Qwen2.5-1.5B · CPU-friendly · 3.1 GB safetensors

Downloads License SakThai Family Leaderboard

Part of the SakThai family — merged, full-parameter release of the 1.5B tool-calling line. Built on zero budget, runs on CPU, and remains one of the most accessible local tool-use models in the family.


Model Description

A merged, full-parameter Qwen2.5-1.5B model fine-tuned for structured tool-calling via <tools> XML schemas and <tool_call> JSON outputs. It is intended for single- and multi-tool use cases where you want a model that stays on-task without out-of-scope tool calls.

Parameter Value
Architecture Qwen2ForCausalLM (qwen2)
Parameters ~1.54 B
Hidden size 1,536
Layers 28
Attention heads 12 (GQA, 2 KV heads)
Intermediate size 8,960
Vocabulary 151,936
Context length 32,768 (32K)
RoPE theta 1,000,000
Base dtype bfloat16
License Apache 2.0
Size ~3.1 GB (safetensors)

How to Use

Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "Nanthasit/sakthai-context-1.5b-merged-v2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cpu")

messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Find news about Tesla, then get its latest stock price."}
]

tools = [
    {"type": "function", "function": {
        "name": "search_web",
        "description": "Search recent news",
        "parameters": {"type": "object", "properties": {"query": {"type": "string"}}, "required": ["query"]}
    }},
    {"type": "function", "function": {
        "name": "get_stock_price",
        "description": "Get current stock price by ticker",
        "parameters": {"type": "object", "properties": {"ticker": {"type": "string"}}, "required": ["ticker"]}
    }}
]

prompt = tokenizer.apply_chat_template(messages, tools=tools, tokenize=False)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=1024, temperature=0.7, top_p=0.8)
print(tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=False))

llama.cpp / GGUF note

This repo ships safetensors only. If you want CPU inference with llama.cpp / Ollama, use the GGUF companion:

# companion GGUF (if available in the family)
ollama run Nanthasit/sakthai-context-1.5b-merged

Benchmarks & Evaluation Status

SakThai Bench v2 (verified artifacts)

Metric Score Verified
Strict Accuracy 34.2 ✅
Selection Accuracy 34.9 ✅
Arguments Accuracy 44.2 ✅

Source: .eval_results/sakthai-bench-v2.yaml in this repo, verified 2026-07-31.

Internal smoke test (cron eval, 2026-07-31)

Metric Score Verified
Multi-tool correctness 100% ✅
Valid JSON rate 100% ✅

Backend: llama.cpp Q4_K_M on CPU, 3 trials, multi-tool prompt (search_web + get_stock_price). Single-prompt smoke test, not a full benchmark.

Limitations

  • Merged full-parameter release; no PEFT/LoRA adapter.
  • Benchmarks are limited: bench-v2 scores show argument accuracy is still weak on this scale.
  • Strong <tool> schema requirement; tool-calling degrades without explicit schemas.
  • English-first training; non-English tool use is not validated.
  • 32K context is config-supported but not stress-tested in this card.
  • Serverless Inference API may be unreliable for merged 3.1 GB safetensors on free tiers.
  • Internal benchmark is a single-prompt smoke test; treat 100% as presence-of-life, not full capability.
  • Evaluation artifacts are local/cron-generated; no third-party evaluation has been run on this merged artifact yet.

Citation

@misc{sakthai-context-1.5b-merged-v2,
  title  = {SakThai Context 1.5B merged v2},
  author = {Beer, Nanthasit},
  year   = {2026},
  url    = {https://huggingface.co/Nanthasit/sakthai-context-1.5b-merged-v2}
}
@misc{qwen2.5,
  title  = {Qwen2.5: A Party of Foundation Models},
  author = {Qwen Team},
  year   = {2024},
  url    = {https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct}
}

Sibling Models

Model Size Role Downloads
context-1.5b-merged 3.1 GB Flagship tool-calling merged 1,599
context-1.5b-merged-v2 (you are here) 3.1 GB v2 merged 337
context-0.5b-merged 988 MB Lightweight merged 1,370
context-7b-merged 15.2 GB Full-power merged 744
context-7b-128k recipe 128K long-context config 506
plus-1.5b 3.1 GB Plus merged 0
plus-1.5b-lora 74 MB Plus adapter 0

Downloads verified live 2026-07-31 via HF API.


Links

House of Sak · GitHub · All models · All datasets

License

Apache 2.0.

Evaluation & Verification

Benchmarks in this card are either directly read from repo artifacts (.eval_results/*.yaml) or referenced from the base model. Smoke-test metrics are single-prompt local runs, not third-party benchmarks, and are labeled verified: false where appropriate. If you independently re-run these evals, Beer asks that you share results back to the leaderboard Space.

Downloads last month
337
Safetensors
Model size
2B 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-1.5b-merged-v2

Finetuned
(1747)
this model

Datasets used to train Nanthasit/sakthai-context-1.5b-merged-v2

Space using Nanthasit/sakthai-context-1.5b-merged-v2 1

Collection including Nanthasit/sakthai-context-1.5b-merged-v2

Evaluation results