Run this model with HF Jobs

Run Nanthasit/sakthai-context-7b-merged on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/Nanthasit/sakthai-context-7b-merged. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Nanthasit/sakthai-context-7b-merged on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Nanthasit/sakthai-context-7b-merged. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="Nanthasit/sakthai-context-7b-merged")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("Nanthasit/sakthai-context-7b-merged")
model = AutoModelForCausalLM.from_pretrained("Nanthasit/sakthai-context-7b-merged", 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=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Benchmark Results

Benchmark: sakthai-bench-v2 · 500 samples · run 2026-08-01

Overall (strict): 38.78 · Selection: 38.78 · Arguments: 45.53

Category Count Selection Arguments Strict
irrelevance_no_tools 50 100.00 100.00 100.00
irrelevance_tools 150 79.33 100.00 79.33
parallel 137 0.00 0.00 0.00
simple 122 7.38 7.38 7.38
held_out - 10.71 10.71 10.71

Model Description

SakThai Context 7B Merged is a merged/continued checkpoint from the SakThai context family. It combines tool-use behaviour from Nanthasit/sakthai-context-7b-tools with long-context capability from Nanthasit/sakthai-context-7b-128k, continuing from Qwen/Qwen2.5-7B-Instruct.

It is intended for:

  • Open-ended text generation with strong local execution
  • Tool-calling and function-calling prompts
  • Long-context agent-style task completion with structured outputs
  • Offline CPU/edge deployment via llama.cpp / Ollama

Intended Use

  • Text generation and chat for English use cases
  • Tool-use workflows with <tools> XML prompt formatting
  • Research on small-to-mid tool-calling models under MIT license

How to Use

from transformers import AutoTokenizer, AutoModelForCausalLM

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

messages = [
  {"role": "user", "content": "List your available tools first, then find today's weather in Bangkok."}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(out[0], skip_special_tokens=True))

For GGUF inference:

from llama_cpp import Llama

llm = Llama(model_path="sakthai-context-7b-merged.Q4_K_M.gguf", n_ctx=32768, n_threads=8)
out = llm("<|user|>\nWhat tools do you have?\n<|assistant|>\n", max_tokens=256)
print(out["choices"][0]["text"])

Datasets

This line was trained/evaluated against SakThai tool-use corpora:

  • Nanthasit/sakthai-combined-v6
  • Nanthasit/sakthai-combined-v7
  • Nanthasit/sakthai-combined-v8

Merged From

  • Nanthasit/sakthai-context-7b-tools
  • Nanthasit/sakthai-context-7b-128k

Benchmarks

Evaluation artifacts are preserved under .eval_results/ in this repository. Baseline comparisons should reference sibling cards:

  • Nanthasit/sakthai-context-7b-tools
  • Nanthasit/sakthai-context-7b-128k

Limitations

  • Merge/continued checkpoint; verify behavior before production use.
  • Tool calling performance depends on prompt formatting; prefer <tools> XML blocks.
  • Long-context generations are most reliable up to ~8k–32k tokens with appropriate context windows.
  • Benchmarking against held-out tools is encouraged before deployment.

Training

This checkpoint continues from prior SakThai context model merges. Datasets used earlier in the lineage include:

  • Nanthasit/sakthai-combined-v6
  • Nanthasit/sakthai-combined-v7
  • Nanthasit/sakthai-combined-v8

See eval/ and .eval_results/ in this repo for local evaluation artifacts.

Citation

@misc{sakthai-context-7b-merged,
  title = {SakThai Context 7B Merged},
  author = {Nanthasit (Beer)},
  year = {2026},
  url = {https://huggingface.co/Nanthasit/sakthai-context-7b-merged}
}

License

MIT

Downloads last month
70
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
Quantized
(473)
this model

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

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

Evaluation results

  • Selection Accuracy on SakThai Bench v2 (500 rows, scorer multiset-selection-v2)
    self-reported
    56.400
  • Arguments Accuracy on SakThai Bench v2 (500 rows, scorer multiset-selection-v2)
    self-reported
    12.300
  • Strict Accuracy on SakThai Bench v2 (500 rows, scorer multiset-selection-v2)
    self-reported
    12.300
  • Held-Out Tool Accuracy on SakThai Bench v2 (500 rows, scorer multiset-selection-v2)
    self-reported
    53.700
  • Degenerate Outputs on SakThai Bench v2 (500 rows, scorer multiset-selection-v2)
    self-reported
    0.000