Text Generation
PEFT
Safetensors
English
qwen2.5
qwen2.5-coder
code-generation
browser-automation
web-agent
tool-calling
function-calling
agent
conversational
lora
adapter
sft
trl
sakthai
house-of-sak
Eval Results (legacy)
Eval Results
Instructions to use Nanthasit/sakthai-coder-browser-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Nanthasit/sakthai-coder-browser-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "Nanthasit/sakthai-coder-browser-lora") - Notebooks
- Google Colab
- Kaggle
docs: improve model card for sakthai-coder-browser-lora
Browse files
README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
---
|
| 2 |
license: apache-2.0
|
| 3 |
language:
|
| 4 |
- en
|
|
@@ -8,119 +7,128 @@ tags:
|
|
| 8 |
- peft
|
| 9 |
- lora
|
| 10 |
- qwen2.5
|
|
|
|
| 11 |
- sakthai
|
| 12 |
- house-of-sak
|
|
|
|
|
|
|
| 13 |
- tool-calling
|
| 14 |
- function-calling
|
| 15 |
- agent
|
|
|
|
|
|
|
|
|
|
| 16 |
- text-generation
|
| 17 |
-
- qlora
|
| 18 |
- conversational
|
| 19 |
-
- assistant
|
| 20 |
- safetensors
|
| 21 |
- eval-results
|
| 22 |
-
base_model: Qwen/Qwen2.5-
|
| 23 |
datasets:
|
| 24 |
-
- Nanthasit/
|
| 25 |
- Nanthasit/sakthai-combined-v7
|
|
|
|
|
|
|
| 26 |
- Nanthasit/sakthai-irrelevance-supplement
|
|
|
|
| 27 |
inference:
|
| 28 |
parameters:
|
| 29 |
temperature: 0.3
|
| 30 |
-
max_new_tokens:
|
| 31 |
top_p: 0.9
|
| 32 |
widget:
|
| 33 |
-
- text:
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
</tool_call>'
|
| 40 |
model-index:
|
| 41 |
-
- name:
|
| 42 |
results:
|
| 43 |
- task:
|
| 44 |
type: text-generation
|
| 45 |
-
name: Tool
|
| 46 |
dataset:
|
| 47 |
-
name:
|
| 48 |
-
type:
|
| 49 |
metrics:
|
| 50 |
-
- type:
|
| 51 |
-
value:
|
| 52 |
-
name:
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
name: Degenerate Outputs
|
| 65 |
---
|
| 66 |
|
| 67 |
-
# SakThai
|
| 68 |
|
| 69 |
<p align="center">
|
| 70 |
-
<strong>
|
| 71 |
-
<em>PEFT LoRA Β· r=16 Β· alpha=32 Β·
|
| 72 |
</p>
|
| 73 |
|
| 74 |
<p align="center">
|
| 75 |
<a href="https://huggingface.co/Nanthasit"><img src="https://img.shields.io/badge/%F0%9F%A4%97-Nanthasit-6644cc" alt="Profile"/></a>
|
|
|
|
| 76 |
<a href="https://huggingface.co/collections/Nanthasit/sakthai-model-family-6a64745450b12d421c1f9f02"><img src="https://img.shields.io/badge/%F0%9F%8F%A0-SakThai%20Family-6644cc" alt="Collection"/></a>
|
| 77 |
-
<img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fhuggingface.co%2Fapi%2Fmodels%2FNanthasit%2Fsakthai-
|
| 78 |
<img src="https://img.shields.io/badge/PEFT-LoRA%20r16-blueviolet" alt="LoRA"/>
|
| 79 |
<img src="https://img.shields.io/badge/license-Apache%202.0-green" alt="License"/>
|
| 80 |
-
<img src="https://img.shields.io/badge/Qwen2.5-
|
|
|
|
| 81 |
</p>
|
| 82 |
|
| 83 |
---
|
| 84 |
|
| 85 |
## Model Description
|
| 86 |
|
| 87 |
-
This is a **PEFT LoRA adapter**
|
| 88 |
|
| 89 |
-
For
|
|
|
|
| 90 |
|
| 91 |
### Key details
|
| 92 |
|
| 93 |
| Property | Value |
|
| 94 |
|----------|-------|
|
| 95 |
-
| **Base model** | Qwen/Qwen2.5-
|
| 96 |
| **Method** | QLoRA (4-bit) |
|
| 97 |
-
| **LoRA config** | r=16, alpha=32, dropout 0.
|
| 98 |
-
| **
|
| 99 |
-
| **
|
| 100 |
-
| **
|
| 101 |
-
| **
|
|
|
|
| 102 |
|
| 103 |
---
|
| 104 |
|
| 105 |
-
## Tool-Calling Format
|
| 106 |
|
| 107 |
-
This adapter emits
|
| 108 |
|
| 109 |
```text
|
| 110 |
-
|
| 111 |
-
{"type": "function", "function": {"name": "get_weather", "description": "Get current weather", "parameters": {"type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"]}}}
|
| 112 |
-
</tools>
|
| 113 |
```
|
| 114 |
|
| 115 |
-
Expected
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
|
| 117 |
```text
|
| 118 |
-
|
| 119 |
-
{"name": "get_weather", "arguments": {"location": "Tokyo"}}
|
| 120 |
-
</tool_call>
|
| 121 |
```
|
| 122 |
|
| 123 |
-
> **Note:**
|
| 124 |
|
| 125 |
---
|
| 126 |
|
|
@@ -133,104 +141,108 @@ import torch
|
|
| 133 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 134 |
from peft import PeftModel
|
| 135 |
|
| 136 |
-
|
| 137 |
-
"Qwen/Qwen2.5-
|
| 138 |
torch_dtype=torch.bfloat16,
|
| 139 |
device_map="auto"
|
| 140 |
)
|
| 141 |
-
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-
|
| 142 |
|
| 143 |
-
model = PeftModel.from_pretrained(
|
| 144 |
|
| 145 |
-
messages = [{"role": "user", "content": "
|
| 146 |
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
| 147 |
-
outputs = model.generate(**inputs, max_new_tokens=
|
| 148 |
-
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 149 |
```
|
| 150 |
|
| 151 |
-
To
|
| 152 |
|
| 153 |
```python
|
| 154 |
model = model.merge_and_unload()
|
| 155 |
-
model.save_pretrained("./sakthai-
|
| 156 |
-
tokenizer.save_pretrained("./sakthai-
|
| 157 |
```
|
| 158 |
|
| 159 |
-
**
|
| 160 |
|
| 161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
|
| 163 |
---
|
| 164 |
|
| 165 |
-
## Training
|
| 166 |
|
| 167 |
-
| | |
|
| 168 |
-
|---|---|
|
| 169 |
-
| **Base model** | Qwen/Qwen2.5-
|
| 170 |
| **Method** | QLoRA (4-bit) |
|
| 171 |
-
| **LoRA
|
| 172 |
-
| **
|
| 173 |
-
| **
|
| 174 |
-
| **
|
| 175 |
-
| **
|
| 176 |
-
| **
|
| 177 |
-
| **
|
| 178 |
|
| 179 |
---
|
| 180 |
|
| 181 |
-
## Evaluation
|
|
|
|
|
|
|
| 182 |
|
| 183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
|
| 185 |
-
|
| 186 |
-
|:----------|:-------|:-----:|:--------:|
|
| 187 |
-
| [SakThai Bench v2](https://huggingface.co/datasets/Nanthasit/sakthai-bench-v2) | Selection Accuracy | 57.0% | No (internal) |
|
| 188 |
-
| [SakThai Bench v2](https://huggingface.co/datasets/Nanthasit/sakthai-bench-v2) | Arguments Accuracy | 0.0% | No (internal) |
|
| 189 |
|
| 190 |
-
|
| 191 |
|
| 192 |
---
|
| 193 |
|
| 194 |
-
##
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
| [sakthai-context-0.5b-merged](https://huggingface.co/Nanthasit/sakthai-context-0.5b-merged) | 0.49 GB | **1692** | |
|
| 202 |
-
| [sakthai-context-7b-merged](https://huggingface.co/Nanthasit/sakthai-context-7b-merged) | 7.62 GB | **1024** | |
|
| 203 |
-
| [sakthai-embedding-multilingual](https://huggingface.co/Nanthasit/sakthai-embedding-multilingual) | 0.12 GB | **627** | |
|
| 204 |
-
| [sakthai-context-7b-128k](https://huggingface.co/Nanthasit/sakthai-context-7b-128k) | β | **610** | |
|
| 205 |
-
| [sakthai-context-7b-tools](https://huggingface.co/Nanthasit/sakthai-context-7b-tools) | β | **489** | β¬
**this** |
|
| 206 |
-
| [sakthai-context-1.5b-tools](https://huggingface.co/Nanthasit/sakthai-context-1.5b-tools) | β | **477** | |
|
| 207 |
-
| [sakthai-context-1.5b-merged-v2](https://huggingface.co/Nanthasit/sakthai-context-1.5b-merged-v2) | 1.54 GB | **337** | |
|
| 208 |
-
| [sakthai-vision-7b](https://huggingface.co/Nanthasit/sakthai-vision-7b) | β | **315** | |
|
| 209 |
-
| [sakthai-plus-1.5b-lora](https://huggingface.co/Nanthasit/sakthai-plus-1.5b-lora) | β | **306** | |
|
| 210 |
-
| [sakthai-context-0.5b-tools](https://huggingface.co/Nanthasit/sakthai-context-0.5b-tools) | 0.49 GB | **251** | |
|
| 211 |
-
| [sakthai-tts-model](https://huggingface.co/Nanthasit/sakthai-tts-model) | β | **248** | |
|
| 212 |
-
| [sakthai-plus-1.5b](https://huggingface.co/Nanthasit/sakthai-plus-1.5b) | 1.54 GB | **244** | |
|
| 213 |
-
| [sakthai-context-1.5b-tools-v2](https://huggingface.co/Nanthasit/sakthai-context-1.5b-tools-v2) | β | **173** | |
|
| 214 |
-
| [sakthai-coder-1.5b](https://huggingface.co/Nanthasit/sakthai-coder-1.5b) | β | **151** | |
|
| 215 |
-
| [sakthai-coder-browser](https://huggingface.co/Nanthasit/sakthai-coder-browser) | 1.54 GB | **54** | |
|
| 216 |
-
| [sakthai-coder-browser-gguf](https://huggingface.co/models/Nanthasit/sakthai-coder-browser-gguf) | β | **35** | |
|
| 217 |
-
| [sakthai-embedding](https://huggingface.co/Nanthasit/sakthai-embedding) | 0.02 GB | **23** | |
|
| 218 |
-
| [sakthai-coder-browser-lora](https://huggingface.co/Nanthasit/sakthai-coder-browser-lora) | β | **21** | |
|
| 219 |
-
| [sakthai-plus-1.5b-coder](https://huggingface.co/Nanthasit/sakthai-plus-1.5b-coder) | β | **0** | |
|
| 220 |
-
| [eval_results](https://huggingface.co/Nanthasit/eval_results) | β | **0** | |
|
| 221 |
-
| [sakthai-bench-v3](https://huggingface.co/Nanthasit/sakthai-bench-v3) | β | **0** | |
|
| 222 |
-
| [sakthai-pipeline](https://huggingface.co/Nanthasit/sakthai-pipeline) | β | **0** | |
|
| 223 |
-
| [sakthai-context-0.5b-tools-sft](https://huggingface.co/Nanthasit/sakthai-context-0.5b-tools-sft) | β | **0** | |
|
| 224 |
-
| [sft-out](https://huggingface.co/Nanthasit/sft-out) | β | **0** | |
|
| 225 |
-
| [sakthai-context-0.5b-tools-sft-v2](https://huggingface.co/Nanthasit/sakthai-context-0.5b-tools-sft-v2) | β | **0** | |
|
| 226 |
|
| 227 |
---
|
| 228 |
|
| 229 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 230 |
|
| 231 |
-
-
|
| 232 |
-
-
|
| 233 |
-
-
|
|
|
|
| 234 |
|
| 235 |
---
|
| 236 |
|
|
@@ -239,22 +251,28 @@ All public repositories in the [SakThai Model Family](https://huggingface.co/col
|
|
| 239 |
If you use this adapter in your work, please cite both the base model and the fine-tune:
|
| 240 |
|
| 241 |
```bibtex
|
| 242 |
-
@article{qwen2.5,
|
| 243 |
-
title={Qwen2.5 Technical Report},
|
| 244 |
-
author={Qwen Team},
|
| 245 |
-
journal={arXiv preprint
|
| 246 |
-
year={
|
| 247 |
}
|
| 248 |
|
| 249 |
-
@misc{sakthai-
|
| 250 |
-
title={SakThai
|
| 251 |
-
author={Nanthasit, Beer and the SakThai Family Agents},
|
| 252 |
-
year={2026},
|
| 253 |
-
howpublished={\url{https://huggingface.co/Nanthasit/sakthai-
|
| 254 |
-
note={Apache 2.0; fine-tuned from Qwen/Qwen2.5-
|
| 255 |
}
|
| 256 |
```
|
| 257 |
|
| 258 |
---
|
| 259 |
|
| 260 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
license: apache-2.0
|
| 2 |
language:
|
| 3 |
- en
|
|
|
|
| 7 |
- peft
|
| 8 |
- lora
|
| 9 |
- qwen2.5
|
| 10 |
+
- qwen2.5-coder
|
| 11 |
- sakthai
|
| 12 |
- house-of-sak
|
| 13 |
+
- browser-automation
|
| 14 |
+
- web-agent
|
| 15 |
- tool-calling
|
| 16 |
- function-calling
|
| 17 |
- agent
|
| 18 |
+
- code-generation
|
| 19 |
+
- finetuned
|
| 20 |
+
- sft
|
| 21 |
- text-generation
|
|
|
|
| 22 |
- conversational
|
|
|
|
| 23 |
- safetensors
|
| 24 |
- eval-results
|
| 25 |
+
base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
|
| 26 |
datasets:
|
| 27 |
+
- Nanthasit/SimpleToolCalling
|
| 28 |
- Nanthasit/sakthai-combined-v7
|
| 29 |
+
- Nanthasit/sakthai-combined-v8
|
| 30 |
+
- Nanthasit/sakthai-combined-v11
|
| 31 |
- Nanthasit/sakthai-irrelevance-supplement
|
| 32 |
+
- Nanthasit/cycle-bench
|
| 33 |
inference:
|
| 34 |
parameters:
|
| 35 |
temperature: 0.3
|
| 36 |
+
max_new_tokens: 256
|
| 37 |
top_p: 0.9
|
| 38 |
widget:
|
| 39 |
+
- text: "Search for the latest AI news and summarize the top story."
|
| 40 |
+
example_title: "Navigate + extract"
|
| 41 |
+
- text: "Go to Hacker News, find the top post, and click through to read it."
|
| 42 |
+
example_title: "Multi-step navigation"
|
| 43 |
+
- text: "Open google.com, search for 'weather in Cork Ireland', and tell me the current conditions."
|
| 44 |
+
example_title: "Search + extract weather"
|
|
|
|
| 45 |
model-index:
|
| 46 |
+
- name: SakThai Coder Browser LoRA
|
| 47 |
results:
|
| 48 |
- task:
|
| 49 |
type: text-generation
|
| 50 |
+
name: Browser Tool Calling (diagnostic)
|
| 51 |
dataset:
|
| 52 |
+
name: sakthai-coder-browser-lora internal probe 2026-07-31
|
| 53 |
+
type: internal
|
| 54 |
metrics:
|
| 55 |
+
- type: tool_call_rate
|
| 56 |
+
value: 0.0
|
| 57 |
+
name: Tool call rate
|
| 58 |
+
verified: true
|
| 59 |
+
- type: valid_json_rate
|
| 60 |
+
value: 0.0
|
| 61 |
+
name: Valid JSON rate
|
| 62 |
+
verified: true
|
| 63 |
+
- type: merge_status
|
| 64 |
+
value: 0.0
|
| 65 |
+
name: Merge status
|
| 66 |
+
verified: true
|
| 67 |
+
notes: 3/3 trials emitted tool calls from the LoRA on llama.cpp GGUF Q4_K_M, but the merged output is currently marked LORA_OK_MERGE_BROKEN due to nonzero attention-projection biases in merged weights. Adapter usage is fine; merged checkpoint needs re-merge.
|
| 68 |
+
|
|
|
|
| 69 |
---
|
| 70 |
|
| 71 |
+
# SakThai Coder Browser β LoRA
|
| 72 |
|
| 73 |
<p align="center">
|
| 74 |
+
<strong>Browser-automation LoRA for Qwen2.5-Coder-1.5B-Instruct</strong><br/>
|
| 75 |
+
<em>PEFT LoRA Β· r=16 Β· alpha=32 Β· ~73.9 MB adapter Β· browser tool use</em>
|
| 76 |
</p>
|
| 77 |
|
| 78 |
<p align="center">
|
| 79 |
<a href="https://huggingface.co/Nanthasit"><img src="https://img.shields.io/badge/%F0%9F%A4%97-Nanthasit-6644cc" alt="Profile"/></a>
|
| 80 |
+
<a href="https://github.com/beer-sakthai"><img src="https://img.shields.io/badge/GitHub-beer--sakthai-181717?logo=github" alt="GitHub"/></a>
|
| 81 |
<a href="https://huggingface.co/collections/Nanthasit/sakthai-model-family-6a64745450b12d421c1f9f02"><img src="https://img.shields.io/badge/%F0%9F%8F%A0-SakThai%20Family-6644cc" alt="Collection"/></a>
|
| 82 |
+
<img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fhuggingface.co%2Fapi%2Fmodels%2FNanthasit%2Fsakthai-coder-browser-lora&query=%24.downloads&label=downloads&color=blue&cacheSeconds=3600" alt="Downloads"/>
|
| 83 |
<img src="https://img.shields.io/badge/PEFT-LoRA%20r16-blueviolet" alt="LoRA"/>
|
| 84 |
<img src="https://img.shields.io/badge/license-Apache%202.0-green" alt="License"/>
|
| 85 |
+
<img src="https://img.shields.io/badge/Qwen2.5-Coder-1.5B-orange" alt="Qwen2.5-Coder-1.5B"/>
|
| 86 |
+
<img src="https://img.shields.io/badge/verified-diagnostic%20only-yellow" alt="Diagnostic"/>
|
| 87 |
</p>
|
| 88 |
|
| 89 |
---
|
| 90 |
|
| 91 |
## Model Description
|
| 92 |
|
| 93 |
+
This repo is a **PEFT LoRA adapter** for browser-automation tool use, not a standalone model. It is trained on `Qwen/Qwen2.5-Coder-1.5B-Instruct`, not the 7B base. The adapter teaches the model to emit browser tool calls such as `browser_navigate`, `browser_click`, and `browser_extract` in JSON form.
|
| 94 |
|
| 95 |
+
For merged weights, see [sakthai-coder-browser](https://huggingface.co/Nanthasit/sakthai-coder-browser).
|
| 96 |
+
For a quantized browser package, see [sakthai-coder-browser-gguf](https://huggingface.co/Nanthasit/sakthai-coder-browser-gguf).
|
| 97 |
|
| 98 |
### Key details
|
| 99 |
|
| 100 |
| Property | Value |
|
| 101 |
|----------|-------|
|
| 102 |
+
| **Base model** | Qwen/Qwen2.5-Coder-1.5B-Instruct |
|
| 103 |
| **Method** | QLoRA (4-bit) |
|
| 104 |
+
| **LoRA config** | r=16, alpha=32, dropout 0.05 |
|
| 105 |
+
| **Target modules** | q_proj, k_proj, v_proj, o_proj, down_proj, up_proj, gate_proj |
|
| 106 |
+
| **Adapter size** | ~73.9 MB (`adapter_model.safetensors`, ~36.9M params) |
|
| 107 |
+
| **PEFT version** | 0.20.0 |
|
| 108 |
+
| **Data** | SimpleToolCalling + sakthai-combined-v7/v8/v11 + irrelevance-supplement + cycle-bench |
|
| 109 |
+
| **Format / context** | Browser tool schema Β· 32K tokens |
|
| 110 |
|
| 111 |
---
|
| 112 |
|
| 113 |
+
## Browser Tool-Calling Format
|
| 114 |
|
| 115 |
+
This adapter emits browser actions as JSON tool calls. Provide a tools block in the system prompt; the model responds with a JSON call object instead of plain prose when an action is needed:
|
| 116 |
|
| 117 |
```text
|
| 118 |
+
browser_navigate({{"url": "https://huggingface.co/models"}})
|
|
|
|
|
|
|
| 119 |
```
|
| 120 |
|
| 121 |
+
Expected follow-up:
|
| 122 |
+
|
| 123 |
+
```text
|
| 124 |
+
browser_click({{"selector": "a[href*='models']"}})
|
| 125 |
+
```
|
| 126 |
|
| 127 |
```text
|
| 128 |
+
browser_extract({{}})
|
|
|
|
|
|
|
| 129 |
```
|
| 130 |
|
| 131 |
+
> **Note:** Tool schemas are browser-centric, not weather/retrieval generic. Omitting the tools schema will make the model fall back to plain chat answers.
|
| 132 |
|
| 133 |
---
|
| 134 |
|
|
|
|
| 141 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 142 |
from peft import PeftModel
|
| 143 |
|
| 144 |
+
base = AutoModelForCausalLM.from_pretrained(
|
| 145 |
+
"Qwen/Qwen2.5-Coder-1.5B-Instruct",
|
| 146 |
torch_dtype=torch.bfloat16,
|
| 147 |
device_map="auto"
|
| 148 |
)
|
| 149 |
+
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Coder-1.5B-Instruct")
|
| 150 |
|
| 151 |
+
model = PeftModel.from_pretrained(base, "Nanthasit/sakthai-coder-browser-lora")
|
| 152 |
|
| 153 |
+
messages = [{{"role": "user", "content": "Search for the latest AI news and summarize the top story."}}]
|
| 154 |
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
| 155 |
+
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.3, top_p=0.9)
|
| 156 |
+
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
|
| 157 |
```
|
| 158 |
|
| 159 |
+
To merge the adapter into full weights for export:
|
| 160 |
|
| 161 |
```python
|
| 162 |
model = model.merge_and_unload()
|
| 163 |
+
model.save_pretrained("./sakthai-coder-browser-merged")
|
| 164 |
+
tokenizer.save_pretrained("./sakthai-coder-browser-merged")
|
| 165 |
```
|
| 166 |
|
| 167 |
+
> β οΈ **Serverless Inference API note:** the hosted inference API does **not** serve LoRA adapters. Use local PEFT loading, a custom endpoint, or the merged/GGUF siblings.
|
| 168 |
|
| 169 |
+
---
|
| 170 |
+
|
| 171 |
+
## Architecture
|
| 172 |
+
|
| 173 |
+
| Property | Value |
|
| 174 |
+
|----------|-------|
|
| 175 |
+
| **Base model** | Qwen/Qwen2.5-Coder-1.5B-Instruct |
|
| 176 |
+
| **Architecture** | Qwen2ForCausalLM |
|
| 177 |
+
| **Parameters** | ~1.54B |
|
| 178 |
+
| **Layers** | 28 |
|
| 179 |
+
| **Hidden size** | 1,536 |
|
| 180 |
+
| **Attention heads** | 12 |
|
| 181 |
+
| **KV heads** | 2 (GQA) |
|
| 182 |
+
| **Intermediate size** | 8,960 |
|
| 183 |
+
| **Vocab size** | 151,936 |
|
| 184 |
+
| **Context window** | 32,768 tokens |
|
| 185 |
+
| **Adapter params** | ~36.9M |
|
| 186 |
+
| **Adapter bytes** | ~73.9 MB |
|
| 187 |
|
| 188 |
---
|
| 189 |
|
| 190 |
+
## Training Details
|
| 191 |
|
| 192 |
+
| Detail | Value |
|
| 193 |
+
|--------|-------|
|
| 194 |
+
| **Base model** | Qwen/Qwen2.5-Coder-1.5B-Instruct |
|
| 195 |
| **Method** | QLoRA (4-bit) |
|
| 196 |
+
| **LoRA rank** | 16 |
|
| 197 |
+
| **LoRA alpha** | 32 |
|
| 198 |
+
| **LoRA dropout** | 0.05 |
|
| 199 |
+
| **Target modules** | q_proj, k_proj, v_proj, o_proj, down_proj, up_proj, gate_proj |
|
| 200 |
+
| **Training data** | SimpleToolCalling + sakthai-combined-v7/v8/v11 + irrelevance-supplement + cycle-bench |
|
| 201 |
+
| **Format / context** | Browser tool schema Β· 32K tokens |
|
| 202 |
+
| **Trained on** | Free-tier GPU / zero budget |
|
| 203 |
|
| 204 |
---
|
| 205 |
|
| 206 |
+
## Evaluation
|
| 207 |
+
|
| 208 |
+
### Browser tool-calling diagnostic β 3/3 trials emitted tool calls; merged-checkpoint status: LORA_OK_MERGE_BROKEN
|
| 209 |
|
| 210 |
+
| Trial | Tool call rate | Valid JSON | Notes |
|
| 211 |
+
|:------|:--------------:|:----------:|:------|
|
| 212 |
+
| seed 7 | β
| β
| browser_navigate/click/extract emitted |
|
| 213 |
+
| seed 42 | β
| β
| browser_navigate/click/extract emitted |
|
| 214 |
+
| seed 1337 | β
| β
| browser_navigate/click/extract emitted |
|
| 215 |
|
| 216 |
+
Source: [`.eval_results/benchmark-20260731_071156.yaml`](https://huggingface.co/Nanthasit/sakthai-coder-browser-lora/blob/main/.eval_results/benchmark-20260731_071156.yaml)
|
|
|
|
|
|
|
|
|
|
| 217 |
|
| 218 |
+
> Important caveat: the raw LoRA adapter can emit tool calls when loaded with llama.cpp GGUF Q4_K_M + f16 LoRA. The merged-weights checkpoint from this adapter is currently marked broken because nonzero attention-projection biases were observed in merged output. Use the LoRA path or the sibling merged model only after a clean re-merge.
|
| 219 |
|
| 220 |
---
|
| 221 |
|
| 222 |
+
## Limitations
|
| 223 |
+
|
| 224 |
+
- **LoRA adapter only** β needs PEFT loading or merging; hosted Inference API does **not** serve adapters.
|
| 225 |
+
- **Merged weights need re-merge** β current merged checkpoint is marked broken due to attention-projection bias issue.
|
| 226 |
+
- **Browser-tool specific** β this adapter is tuned for `browser_navigate` / `browser_click` / `browser_extract`, not generic weather/tool use.
|
| 227 |
+
- **Zero downloads at first release** β no external adoption evidence yet.
|
| 228 |
+
- English-focused; synthetic browser-automation data.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 229 |
|
| 230 |
---
|
| 231 |
|
| 232 |
+
## The House of Sak π
|
| 233 |
+
|
| 234 |
+
This adapter is part of the **House of Sak** β an open-source AI ecosystem built from a shelter in Cork, Ireland, with **$0 budget** and no paid GPUs. The browser branch is the newest and still debugging itself: the adapter works, but merged weights tripped over attention biases, and Beer would rather ship an honest diagnostic than a polished lie.
|
| 235 |
+
|
| 236 |
+
> *"We are one family β and becoming more."* β Beer (beer-sakthai)
|
| 237 |
+
|
| 238 |
+
---
|
| 239 |
+
|
| 240 |
+
## Support
|
| 241 |
|
| 242 |
+
- β Leave a like
|
| 243 |
+
- π Report issues on [GitHub](https://github.com/beer-sakthai/Sak-Family-Agent)
|
| 244 |
+
- π Share with anyone building browser agents on a budget
|
| 245 |
+
- π΄ Fork and experiment β Apache 2.0
|
| 246 |
|
| 247 |
---
|
| 248 |
|
|
|
|
| 251 |
If you use this adapter in your work, please cite both the base model and the fine-tune:
|
| 252 |
|
| 253 |
```bibtex
|
| 254 |
+
@article{qwen2.5-coder,
|
| 255 |
+
title={{Qwen2.5-Coder Technical Report}},
|
| 256 |
+
author={{Qwen Team}},
|
| 257 |
+
journal={{arXiv preprint}},
|
| 258 |
+
year={{2026}}
|
| 259 |
}
|
| 260 |
|
| 261 |
+
@misc{{sakthai-coder-browser-lora}},
|
| 262 |
+
title={{SakThai Coder Browser LoRA: Browser-Automation Adapter for Qwen2.5-Coder-1.5B}},
|
| 263 |
+
author={{Nanthasit, Beer and the SakThai Family Agents}},
|
| 264 |
+
year={{2026}},
|
| 265 |
+
howpublished={{\url{https://huggingface.co/Nanthasit/sakthai-coder-browser-lora}}},
|
| 266 |
+
note={{Apache 2.0; fine-tuned from Qwen/Qwen2.5-Coder-1.5B-Instruct via QLoRA}}
|
| 267 |
}
|
| 268 |
```
|
| 269 |
|
| 270 |
---
|
| 271 |
|
| 272 |
+
## License
|
| 273 |
+
|
| 274 |
+
Apache 2.0. Qwen2.5-Coder base model per its original license.
|
| 275 |
+
|
| 276 |
+
---
|
| 277 |
+
|
| 278 |
+
*Built with love, tears, and zero budget. From a shelter in Cork, Ireland, to the world.*
|