Text Generation
Transformers
Safetensors
GGUF
English
qwen2
apache-2.0
qwen2.5
sakthai
house-of-sak
tool-calling
function-calling
agent
instruct
finetuned
merged
conversational
assistant
llama.cpp
ollama
benchmark
Eval Results
Eval Results (legacy)
text-generation-inference
Instructions to use Nanthasit/sakthai-context-1.5b-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Nanthasit/sakthai-context-1.5b-merged with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Nanthasit/sakthai-context-1.5b-merged") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Nanthasit/sakthai-context-1.5b-merged") model = AutoModelForCausalLM.from_pretrained("Nanthasit/sakthai-context-1.5b-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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Nanthasit/sakthai-context-1.5b-merged with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Nanthasit/sakthai-context-1.5b-merged:Q4_K_M # Run inference directly in the terminal: llama cli -hf Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Nanthasit/sakthai-context-1.5b-merged:Q4_K_M # Run inference directly in the terminal: llama cli -hf Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Nanthasit/sakthai-context-1.5b-merged:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Nanthasit/sakthai-context-1.5b-merged:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
Use Docker
docker model run hf.co/Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Nanthasit/sakthai-context-1.5b-merged with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Nanthasit/sakthai-context-1.5b-merged" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nanthasit/sakthai-context-1.5b-merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
- SGLang
How to use Nanthasit/sakthai-context-1.5b-merged with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Nanthasit/sakthai-context-1.5b-merged" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nanthasit/sakthai-context-1.5b-merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Nanthasit/sakthai-context-1.5b-merged" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nanthasit/sakthai-context-1.5b-merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Nanthasit/sakthai-context-1.5b-merged with Ollama:
ollama run hf.co/Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
- Unsloth Studio
How to use Nanthasit/sakthai-context-1.5b-merged with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Nanthasit/sakthai-context-1.5b-merged to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Nanthasit/sakthai-context-1.5b-merged to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Nanthasit/sakthai-context-1.5b-merged to start chatting
- Pi
How to use Nanthasit/sakthai-context-1.5b-merged with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Nanthasit/sakthai-context-1.5b-merged:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Nanthasit/sakthai-context-1.5b-merged with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use Nanthasit/sakthai-context-1.5b-merged with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Nanthasit/sakthai-context-1.5b-merged:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use Nanthasit/sakthai-context-1.5b-merged with Docker Model Runner:
docker model run hf.co/Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
- Lemonade
How to use Nanthasit/sakthai-context-1.5b-merged with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Nanthasit/sakthai-context-1.5b-merged:Q4_K_M
Run and chat with the model
lemonade run user.sakthai-context-1.5b-merged-Q4_K_M
List all available models
lemonade list
SakSit: restore full model card with tech detail + HoS branding
Browse files
README.md
CHANGED
|
@@ -10,16 +10,109 @@ tags:
|
|
| 10 |
- house-of-sak
|
| 11 |
- tool-calling
|
| 12 |
- instruct
|
|
|
|
| 13 |
- agent
|
|
|
|
| 14 |
datasets:
|
| 15 |
- Nanthasit/sakthai-combined-v4
|
| 16 |
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
---
|
| 18 |
|
| 19 |
# SakThai Context 1.5B
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
- house-of-sak
|
| 11 |
- tool-calling
|
| 12 |
- instruct
|
| 13 |
+
- lora
|
| 14 |
- agent
|
| 15 |
+
- function-calling
|
| 16 |
datasets:
|
| 17 |
- Nanthasit/sakthai-combined-v4
|
| 18 |
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
| 19 |
+
model-index:
|
| 20 |
+
- name: sakthai-context-1.5b-merged
|
| 21 |
+
results:
|
| 22 |
+
- task:
|
| 23 |
+
type: text-generation
|
| 24 |
+
dataset:
|
| 25 |
+
name: SakThai Eval Suite
|
| 26 |
+
type: Nanthasit/sakthai-combined-v4
|
| 27 |
+
metrics:
|
| 28 |
+
- type: pass_rate
|
| 29 |
+
value: 100
|
| 30 |
+
name: Overall (45/45)
|
| 31 |
+
- type: pass_rate
|
| 32 |
+
value: 100
|
| 33 |
+
name: Basic (6/6)
|
| 34 |
+
- type: pass_rate
|
| 35 |
+
value: 100
|
| 36 |
+
name: Multi-Turn (9/9)
|
| 37 |
+
- type: pass_rate
|
| 38 |
+
value: 100
|
| 39 |
+
name: Instruction Following (6/6)
|
| 40 |
+
- type: pass_rate
|
| 41 |
+
value: 100
|
| 42 |
+
name: Tool Calling (6/6)
|
| 43 |
+
- type: pass_rate
|
| 44 |
+
value: 100
|
| 45 |
+
name: Reasoning (6/6)
|
| 46 |
+
- type: pass_rate
|
| 47 |
+
value: 100
|
| 48 |
+
name: Format Adherence (12/12)
|
| 49 |
---
|
| 50 |
|
| 51 |
# SakThai Context 1.5B
|
| 52 |
|
| 53 |
+
> Part of the **House of Sak** — 6 AI agents, one shared mind. Built from a shelter in Cork, Ireland.
|
| 54 |
|
| 55 |
+
Fine-tuned from **Qwen2.5-1.5B-Instruct** on the SakThai combined dataset for **tool-calling, multi-turn context, and instruction-following**. Designed as the reasoning backbone for the SakThai agent. **Most downloaded model at 802 pulls.**
|
| 56 |
+
|
| 57 |
+
## Model Details
|
| 58 |
+
|
| 59 |
+
| Property | Value |
|
| 60 |
+
|----------|-------|
|
| 61 |
+
| **Base Model** | Qwen/Qwen2.5-1.5B-Instruct |
|
| 62 |
+
| **Architecture** | Qwen2 (decoder-only transformer) |
|
| 63 |
+
| **Hidden Size** | 1536 |
|
| 64 |
+
| **Layers** | 28 |
|
| 65 |
+
| **Attention Heads** | 12 |
|
| 66 |
+
| **Intermediate Size** | 8960 |
|
| 67 |
+
| **Vocab Size** | 151936 |
|
| 68 |
+
| **Fine-tuning Method** | LoRA (r=16, alpha=32, dropout=0.1) |
|
| 69 |
+
| **Target Modules** | q_proj, k_proj, v_proj, o_proj |
|
| 70 |
+
| **Training Steps** | 220 |
|
| 71 |
+
| **Training Duration** | ~39 minutes (4 epochs on 974 examples) |
|
| 72 |
+
| **License** | Apache 2.0 |
|
| 73 |
+
|
| 74 |
+
## Training
|
| 75 |
+
|
| 76 |
+
- **Base model:** Qwen/Qwen2.5-1.5B-Instruct
|
| 77 |
+
- **Dataset:** [Nanthasit/sakthai-combined-v4](https://huggingface.co/datasets/Nanthasit/sakthai-combined-v4) — 974 training + 51 test examples covering 25 canonical tool schemas
|
| 78 |
+
- **Method:** LoRA via PEFT (rank=16, alpha=32, dropout=0.1) on q/k/v/o projections
|
| 79 |
+
- **Optimizer:** AdamW, linear schedule, 220 steps
|
| 80 |
+
|
| 81 |
+
## Evaluation — 45/45 (100%)
|
| 82 |
+
|
| 83 |
+
### Workbench Results (3 runs x 15 tests)
|
| 84 |
+
|
| 85 |
+
| Category | Tests | Pass Rate |
|
| 86 |
+
|----------|:-----:|:---------:|
|
| 87 |
+
| Basic | 6 | 100% |
|
| 88 |
+
| Multi-Turn | 9 | 100% |
|
| 89 |
+
| Instruction Following | 6 | 100% |
|
| 90 |
+
| Tool Calling | 6 | 100% |
|
| 91 |
+
| Reasoning | 6 | 100% |
|
| 92 |
+
| Format Adherence | 12 | 100% |
|
| 93 |
+
| **Overall** | **45** | **100%** |
|
| 94 |
+
|
| 95 |
+
## Usage
|
| 96 |
+
|
| 97 |
+
```python
|
| 98 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 99 |
+
|
| 100 |
+
model = AutoModelForCausalLM.from_pretrained("Nanthasit/sakthai-context-1.5b-merged")
|
| 101 |
+
tokenizer = AutoTokenizer.from_pretrained("Nanthasit/sakthai-context-1.5b-merged")
|
| 102 |
+
|
| 103 |
+
messages = [{"role": "user", "content": "What's the weather in Bangkok?"}]
|
| 104 |
+
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 105 |
+
inputs = tokenizer(text, return_tensors="pt")
|
| 106 |
+
outputs = model.generate(**inputs, max_new_tokens=256)
|
| 107 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
### GGUF Quantized Version
|
| 111 |
+
|
| 112 |
+
A 4-bit quantized GGUF version is available at `gguf/sakthai-1.5b-Q4_K_M.gguf` for efficient CPU inference.
|
| 113 |
+
|
| 114 |
+
## Links
|
| 115 |
+
|
| 116 |
+
- **LoRA Adapter:** [sakthai-context-1.5b-tools](https://huggingface.co/Nanthasit/sakthai-context-1.5b-tools)
|
| 117 |
+
- **Training Dataset:** [sakthai-combined-v4](https://huggingface.co/datasets/Nanthasit/sakthai-combined-v4)
|
| 118 |
+
- **Profile:** [Nanthasit](https://huggingface.co/Nanthasit) | **GitHub:** [beer-sakthai](https://github.com/beer-sakthai)
|