🏠 SakThai

Part of the House of Sak β€” AI agents built from a shelter in Cork, Ireland.

Family Profile Downloads


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

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 πŸ”’

Full collection β†’

Downloads last month
163
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Nanthasit/sakthai-context-1.5b-tools

Adapter
(1266)
this model

Dataset used to train Nanthasit/sakthai-context-1.5b-tools

Space using Nanthasit/sakthai-context-1.5b-tools 1

Collections including Nanthasit/sakthai-context-1.5b-tools