[!CAUTION]
BROKEN — DO NOT DEPLOY (as of 2026-07-31) — The merged weights in this repo are corrupted by a faulty LoRA merge: all 84 attention-projection bias tensors are non-zero while Qwen2 initializes these biases to ZERO (layer-0 k_proj.bias absmean 27.7 / max 354). Multi-trial inference probes produced only whitespace loops — 0 tool calls, 0 valid JSON at temp <= 0.7. Full evidence: .eval_results/benchmark-20260731_052122.yaml. The fault is in the weights, not the GGUF conversion or the prompt format. The GGUF variant was converted from these same corrupted weights and must be re-checked; the LoRA adapter needs a clean re-merge. Treat this repo as not deployable until re-merged and re-verified.
Model Description
SakThai Coder Browser transforms Qwen2.5-Coder-1.5B-Instruct into a browser automation assistant that outputs structured <tool_call> XML/JSON for web interaction. It can navigate pages, click elements, type text, and extract content — designed to work with browser automation frameworks.
The repo ships its own chat_template.jinja (Qwen2.5 tool-calling style). When tools are provided, the system prompt embeds function signatures inside <tools></tools> XML tags and the model replies with a <tool_call> JSON block:
text
1<|im_start|>system
2You are Qwen, created by Alibaba Cloud. You are a helpful assistant.
34# Tools
56You may call one or more functions to assist with the user query.
78You are provided with function signatures within <tools></tools> XML tags:
9<tools>
10{"type": "function", "function": {"name": "browser_navigate", "parameters": {...}}}
11</tools>
1213For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
14<tool_call>
15{"name": <function-name>, "arguments": <args-json-object>}
16</tool_call><|im_end|>
17<|im_start|>user
18Search for the latest AI news.<|im_end|>
19<|im_start|>assistant
20<tool_call>
21{"name": "browser_navigate", "arguments": {"url": "https://news.google.com"}}
22</tool_call><|im_end|>
Tool results are wrapped in <tool_response></tool_response> blocks. Multi-turn loops are supported by the chat template.
Quick Start
python
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
34model = AutoModelForCausalLM.from_pretrained(5"Nanthasit/sakthai-coder-browser",6 torch_dtype=torch.bfloat16,7 device_map="auto"8)9tokenizer = AutoTokenizer.from_pretrained("Nanthasit/sakthai-coder-browser")1011messages =[12{"role":"system","content":"You are SakThai Browser Agent. Use <tool_call> blocks to control the browser."},13{"role":"user","content":"Search for the latest AI news and summarize the top story."},14]15inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)16outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.3)17print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
Use the chat template. This model was trained with the Qwen2.5 tool-calling format — pass tools through apply_chat_template (or the repo's chat_template.jinja) rather than hand-rolling prompts.
GGUF / llama.cpp variant
Prefer CPU inference or Ollama? Use the GGUF build (F16, ~7.1 GB) with llama.cpp:
bash
1huggingface-cli download Nanthasit/sakthai-coder-browser-gguf \2 sakthai-coder-browser-f16.gguf --local-dir ./
3./llama-cli -m sakthai-coder-browser-f16.gguf \4 -p "<|im_start|>system\nYou are a browser automation assistant.<|im_end|>\n<|im_start|>user\nGo to google.com and search for the latest AI news<|im_end|>\n<|im_start|>assistant\n"\5 -n 512 -t 8 --temp 0.3
Architecture
Verified from this repo's config.json (transformers 5.14.1):
Single model.safetensors — 3,087,467,144 B (2.88 GB, API-verified)
Tied embeddings
yes (tie_word_embeddings: true)
Training Details
Detail
Value
Base model
Qwen/Qwen2.5-Coder-1.5B-Instruct
Method
SFT via LoRA (r=16, alpha=32, dropout 0.05, rsLoRA) on all 7 linear projections, then merged to full weights
Context length
32,768 tokens
Precision
BF16
Hardware
Free T4 GPU (Kaggle / Colab)
Budget
$0
Training configuration mirrors the sibling sakthai-coder-browser-lora adapter (verified from its adapter_config.json: peft 0.20.0, use_rslora: true, lora_dropout: 0.05, target modules q/k/v/o/gate/up/down_proj).
Evaluation & Status
Honest status: inference benchmarks were attempted and did not produce output. The repo's own .eval_results/benchmark-20260731_052122.yaml records a llama.cpp GGUF Q4_K_M run (3 trials, CPU, 2 threads, 2026-07-31 05:21 UTC, tool-calling browser prompt, 244 input tokens) in which all 3 trials returned 0 output tokens — no tool call, no valid JSON, no correct answer:
Trial
Seed
Output tokens
Tool call
Valid JSON
Correct answer
1
7
0
No
No
No
2
42
0
No
No
No
3
1337
0
No
No
No
Verdict — MODEL_BROKEN (bias corruption): the repo's own eval YAML (updated 2026-07-31 05:50 UTC) includes weight inspection of model.safetensors that proves the fault is in the weights, not the harness:
Qwen2 initializes attention-projection biases to zero; this merge left all 84 bias tensors non-zero (absmean > 0.01), e.g. layer-0 k_proj.bias absmean 27.7 / max 354, layer-0 q_proj.bias absmean 1.17
Degenerate generation at temp <= 0.7 on all 3 seeds — whitespace loops (150 newline tokens, 0 tool calls, 0 valid JSON); only at temp 1.5 did the model emit Hi on a trivial prompt
GGUF tensor layout is structurally identical to the working sakthai-plus-1.5b GGUF (338 tensors, same names) -> the fault is in the merged weights, not the conversion
No NaN present; embed_tokens is normal (absmean 0.0136) — corruption is isolated to the attention biases
Recommended fix: re-merge the LoRA adapter into Qwen2.5-Coder-1.5B-Instruct with correct bias handling (do not write adapter-state biases into the base where Qwen2 expects zeros), re-run the multi-trial probe, and update this card. Until then, this repo is not deployable.
Hosted inference: not available — router probe returned 404 (Not Found) and the legacy api-inference host does not resolve (per the same eval YAML). No model-index is published because there are no verified scores yet; publishing one would be misleading.
Ecosystem status from .eval_results/cron-eval-sakthai-coder-browser-2026-07-30-1.yaml: card quality 85/100, repo hygiene 95/100, health 23/100 (rank 20/20 — new repo, zero downloads at eval time; popularity/momentum/benchmarks components are 0 because the repo had no traction yet).
If you want to verify the broken-state diagnosis locally, run the same llama.cpp probe used for this card:
bash
1# Convert the current merged weights to GGUF Q4_K_M2python -m scripts.convert_hf_to_gguf --outfile sakthai-coder-browser-q4_k_m.gguf --quant-type Q4_K_M ./sakthai-coder-browser
34# 3-trial probe, 2 threads, CPU only5forseedin7421337;do6 ./llama-cli -m sakthai-coder-browser-q4_k_m.gguf \7 -p "$(cat prompts/browser_tool_call.txt)"\8 -n 256 --temp 0.3 -t 2 --seed $seed9done
All 3 trials should return 0 output tokens if the weight corruption is still present.
If they produce normal <tool_call> JSON blocks, the repo has been repaired.
Reproduce Training / Merge
The merged weights were produced by applying the LoRA adapter onto Qwen/Qwen2.5-Coder-1.5B-Instruct. To reproduce or repair:
Important: zero-out attention-projection biases after merge if the base initializes them to zero:
python
1from transformers import AutoModelForCausalLM
2model = AutoModelForCausalLM.from_pretrained("repaired-merged", trust_remote_code=True)3for name, param in model.named_parameters():4if"bias"in name and"attn"in name and"k_proj"in name:5 param.data.zero_()
Run the eval probe again before publishing.
Limitations
BROKEN weights — all 84 attention bias tensors are corrupted by a faulty LoRA merge (see Evaluation & Status); do not deploy until re-merged and re-verified
No verified benchmark scores yet — model-index currently carries 0% tool_call_rate and 0% valid_json_rate from the 2026-07-31 diagnostic probe; these are failure signals from corrupted weights, not representative task scores
Text-only — cannot see images or screenshots (use sakthai-vision-7b for vision tasks)
English-only web actions — training data is primarily English web interactions; non-English pages may yield lower-quality actions
Context-limited — best results with page content <= 4K tokens per interaction; long pages can exceed the model's effective working memory
Not servable on HF serverless inference — no provider supports this custom fine-tune (router 404 verified); run locally via Transformers or the GGUF build once weights are repaired
Citation
If you use SakThai Coder Browser in your work, please cite the base model and the fine-tuning approach:
bibtex
1@misc{qwen25coder,
2 title = {Qwen2.5-Coder: Code Language Models},
3 author = {Qwen Team},
4 year = {2024},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct}}
7}
89@misc{sakthai-model-family,
10 title = {SakThai Model Family: Zero-Budget Fine-Tuned Language Models},
11 author = {{Beer Nanthasit}},
12 year = {2026},
13 publisher = {Hugging Face},
14 howpublished = {\url{https://huggingface.co/collections/Nanthasit/sakthai-model-family-6a64745450b12d421c1f9f02}}
15}
Part of the SakThai Model Family. Built with love, tears, and zero budget. From a shelter in Cork, Ireland, to the world.