Nanthasit commited on
Commit
db1252d
Β·
verified Β·
1 Parent(s): 3ba2cc0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +164 -12
README.md CHANGED
@@ -13,16 +13,29 @@ tags:
13
  - web-agent
14
  - tool-calling
15
  - function-calling
 
16
  - agent
17
  - code-generation
18
  - finetuned
 
19
  - sft
20
  - text-generation
21
  - merged
 
 
 
22
  base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
23
  datasets:
24
  - Nanthasit/SimpleToolCalling
25
  - Nanthasit/sakthai-combined-v7
 
 
 
 
 
 
 
 
26
  ---
27
 
28
  # SakThai Coder Browser
@@ -36,21 +49,59 @@ datasets:
36
  <a href="https://huggingface.co/Nanthasit"><img src="https://img.shields.io/badge/%F0%9F%A4%97-Nanthasit-6644cc" alt="Profile"/></a>
37
  <a href="https://github.com/beer-sakthai"><img src="https://img.shields.io/badge/GitHub-beer--sakthai-181717?logo=github" alt="GitHub"/></a>
38
  <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>
 
39
  <img src="https://img.shields.io/badge/license-Apache%202.0-green" alt="License"/>
40
  <img src="https://img.shields.io/badge/task-browser%20automation-ff6b6b" alt="Task"/>
 
41
  </p>
42
 
43
  ---
44
 
45
  ## Model Description
46
 
47
- SakThai Coder Browser transforms Qwen2.5-Coder-1.5B-Instruct into a **browser automation assistant** that outputs structured `<tool_call>` XML for web interaction. It can navigate pages, click elements, type text, and extract content β€” designed to work with browser automation frameworks.
48
 
49
  **Available actions via `<tool_call>` XML:**
50
- - `browser_navigate(url)` β€” navigate to a URL
51
- - `browser_click(element)` β€” click a UI element
52
- - `browser_type(element, text)` β€” type text into a field
53
- - `browser_extract()` β€” extract page content
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
  ---
56
 
@@ -72,7 +123,7 @@ messages = [
72
  {"role": "user", "content": "Search for the latest AI news and summarize the top story."},
73
  ]
74
  inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
75
- outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)
76
  print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
77
  ```
78
 
@@ -81,6 +132,44 @@ Expected output format:
81
  <tool_call>{"name": "browser_navigate", "arguments": {"url": "https://news.google.com"}}</tool_call>
82
  ```
83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  ---
85
 
86
  ## Training Details
@@ -88,13 +177,44 @@ Expected output format:
88
  | Detail | Value |
89
  |--------|-------|
90
  | **Base model** | Qwen/Qwen2.5-Coder-1.5B-Instruct |
91
- | **Method** | Full parameter fine-tuning via SFT |
92
  | **Training data** | SimpleToolCalling + sakthai-combined-v7 |
93
- | **Optimizer** | AdamW |
94
- | **Learning rate** | 2e-5 (cosine decay) |
95
  | **Context length** | 32,768 tokens |
96
  | **Precision** | BF16 |
97
  | **Hardware** | Free T4 GPU (Kaggle / Colab) |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
  ---
100
 
@@ -108,10 +228,42 @@ Expected output format:
108
 
109
  ---
110
 
111
- ## Evaluation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
- **Benchmarks are pending.** Formal evaluation on browser automation tasks coming soon.
 
 
 
 
114
 
115
  ---
116
 
117
- *Part of the [SakThai Model Family](https://huggingface.co/collections/Nanthasit/sakthai-model-family-6a64745450b12d421c1f9f02). Built with love, tears, and zero budget. From a shelter in Cork, Ireland, to the world.*
 
13
  - web-agent
14
  - tool-calling
15
  - function-calling
16
+ - tool-use
17
  - agent
18
  - code-generation
19
  - finetuned
20
+ - finetune
21
  - sft
22
  - text-generation
23
  - merged
24
+ - conversational
25
+ - safetensors
26
+ - transformers
27
  base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
28
  datasets:
29
  - Nanthasit/SimpleToolCalling
30
  - Nanthasit/sakthai-combined-v7
31
+ inference:
32
+ parameters:
33
+ temperature: 0.3
34
+ max_new_tokens: 256
35
+ top_p: 0.9
36
+ widget:
37
+ - text: "Search for the latest AI news and summarize the top story."
38
+ example_title: "Navigate + extract"
39
  ---
40
 
41
  # SakThai Coder Browser
 
49
  <a href="https://huggingface.co/Nanthasit"><img src="https://img.shields.io/badge/%F0%9F%A4%97-Nanthasit-6644cc" alt="Profile"/></a>
50
  <a href="https://github.com/beer-sakthai"><img src="https://img.shields.io/badge/GitHub-beer--sakthai-181717?logo=github" alt="GitHub"/></a>
51
  <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>
52
+ <img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fhuggingface.co%2Fapi%2Fmodels%2FNanthasit%2Fsakthai-coder-browser&query=%24.downloads&label=downloads&color=blue" alt="Downloads"/>
53
  <img src="https://img.shields.io/badge/license-Apache%202.0-green" alt="License"/>
54
  <img src="https://img.shields.io/badge/task-browser%20automation-ff6b6b" alt="Task"/>
55
+ <img src="https://img.shields.io/badge/base-Qwen2.5--Coder--1.5B--Instruct-blueviolet" alt="Base"/>
56
  </p>
57
 
58
  ---
59
 
60
  ## Model Description
61
 
62
+ 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.
63
 
64
  **Available actions via `<tool_call>` XML:**
65
+
66
+ | Tool | Example |
67
+ |------|---------|
68
+ | `browser_navigate(url)` | `<tool_call>{"name": "browser_navigate", "arguments": {"url": "https://example.com"}}</tool_call>` |
69
+ | `browser_click(element)` | `<tool_call>{"name": "browser_click", "arguments": {"element": "#search-button"}}</tool_call>` |
70
+ | `browser_type(element, text)` | `<tool_call>{"name": "browser_type", "arguments": {"element": "#search-input", "text": "AI news"}}</tool_call>` |
71
+ | `browser_extract()` | `<tool_call>{"name": "browser_extract", "arguments": {}}</tool_call>` |
72
+
73
+ ---
74
+
75
+ ## Tool-Calling Format
76
+
77
+ 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:
78
+
79
+ ```text
80
+ <|im_start|>system
81
+ You are Qwen, created by Alibaba Cloud. You are a helpful assistant.
82
+
83
+ # Tools
84
+
85
+ You may call one or more functions to assist with the user query.
86
+
87
+ You are provided with function signatures within <tools></tools> XML tags:
88
+ <tools>
89
+ {"type": "function", "function": {"name": "browser_navigate", "parameters": {...}}}
90
+ </tools>
91
+
92
+ For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
93
+ <tool_call>
94
+ {"name": <function-name>, "arguments": <args-json-object>}
95
+ </tool_call><|im_end|>
96
+ <|im_start|>user
97
+ Search for the latest AI news.<|im_end|>
98
+ <|im_start|>assistant
99
+ <tool_call>
100
+ {"name": "browser_navigate", "arguments": {"url": "https://news.google.com"}}
101
+ </tool_call><|im_end|>
102
+ ```
103
+
104
+ Tool results are wrapped in `<tool_response></tool_response>` blocks. Multi-turn loops are supported by the chat template.
105
 
106
  ---
107
 
 
123
  {"role": "user", "content": "Search for the latest AI news and summarize the top story."},
124
  ]
125
  inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
126
+ outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.3)
127
  print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
128
  ```
129
 
 
132
  <tool_call>{"name": "browser_navigate", "arguments": {"url": "https://news.google.com"}}</tool_call>
133
  ```
134
 
135
+ > ⚠️ **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.
136
+
137
+ ### GGUF / llama.cpp variant
138
+
139
+ Prefer CPU inference or Ollama? Use the [GGUF build](https://huggingface.co/Nanthasit/sakthai-coder-browser-gguf) (F16, ~7.1 GB) with llama.cpp:
140
+
141
+ ```bash
142
+ huggingface-cli download Nanthasit/sakthai-coder-browser-gguf \
143
+ sakthai-coder-browser-f16.gguf --local-dir ./
144
+ ./llama-cli -m sakthai-coder-browser-f16.gguf \
145
+ -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" \
146
+ -n 512 -t 8 --temp 0.3
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Architecture
152
+
153
+ Verified from this repo's `config.json` (transformers 5.14.1):
154
+
155
+ | Property | Value |
156
+ |----------|-------|
157
+ | **Base Model** | [Qwen/Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct) |
158
+ | **Architecture** | Qwen2ForCausalLM (decoder-only transformer) |
159
+ | **Parameters** | 1,543,714,304 (1.54B) |
160
+ | **Hidden Size** | 1,536 |
161
+ | **Layers** | 28 |
162
+ | **Attention Heads** | 12 (GQA, 2 KV heads) |
163
+ | **Intermediate Size** | 8,960 |
164
+ | **Max Position** | 32,768 tokens |
165
+ | **Vocab Size** | 151,936 |
166
+ | **RoPE ΞΈ** | 1,000,000 |
167
+ | **Activation** | SiLU (SwiGLU) |
168
+ | **Normalization** | RMSNorm (eps=1e-6) |
169
+ | **Precision** | BF16 |
170
+ | **Weights** | Single `model.safetensors` β€” 3,087,467,144 B (2.88 GB, API-verified) |
171
+ | **Tied embeddings** | yes (`tie_word_embeddings: true`) |
172
+
173
  ---
174
 
175
  ## Training Details
 
177
  | Detail | Value |
178
  |--------|-------|
179
  | **Base model** | Qwen/Qwen2.5-Coder-1.5B-Instruct |
180
+ | **Method** | SFT via LoRA (r=16, Ξ±=32, dropout 0.05, rsLoRA) on all 7 linear projections, then merged to full weights |
181
  | **Training data** | SimpleToolCalling + sakthai-combined-v7 |
 
 
182
  | **Context length** | 32,768 tokens |
183
  | **Precision** | BF16 |
184
  | **Hardware** | Free T4 GPU (Kaggle / Colab) |
185
+ | **Budget** | $0 |
186
+
187
+ Training configuration mirrors the sibling [sakthai-coder-browser-lora](https://huggingface.co/Nanthasit/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).
188
+
189
+ ---
190
+
191
+ ## Evaluation & Status
192
+
193
+ **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:
194
+
195
+ | Trial | Seed | Output tokens | Tool call | Valid JSON | Correct answer |
196
+ |:-----:|:----:|:-------------:|:---------:|:----------:|:--------------:|
197
+ | 1 | 7 | 0 | ❌ | ❌ | ❌ |
198
+ | 2 | 42 | 0 | ❌ | ❌ | ❌ |
199
+ | 3 | 1337 | 0 | ❌ | ❌ | ❌ |
200
+
201
+ **Likely causes to investigate:** prompt-format mismatch with the GGUF build, or the GGUF conversion/quantization path. The Transformers (`model.safetensors`) path has **not** been benchmarked yet β€” a proper multi-trial eval on the safetensors weights is the open item.
202
+
203
+ **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.
204
+
205
+ 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).
206
+
207
+ ---
208
+
209
+ ## Repo Contents
210
+
211
+ | File | Size | Purpose |
212
+ |------|-----:|---------|
213
+ | `model.safetensors` | 3,087,467,144 B | Merged BF16 weights (single shard) |
214
+ | `chat_template.jinja` | 2,507 B | Qwen2.5 tool-calling chat template |
215
+ | `config.json` | 1,373 B | Qwen2 config (32K ctx, GQA 2 KV heads) |
216
+ | `tokenizer.json` | 11,421,892 B | Tokenizer |
217
+ | `.eval_results/` | β€” | benchmark + cron-eval YAMLs |
218
 
219
  ---
220
 
 
228
 
229
  ---
230
 
231
+ ## Model Family
232
+
233
+ One of **19 public models** in the [SakThai Model Family collection](https://huggingface.co/collections/Nanthasit/sakthai-model-family-6a64745450b12d421c1f9f02) (20 including a private experimental embedding). Live download counts as of **2026-07-31**; sizes API-verified from largest weight file.
234
+
235
+ | Model | Size | Type | Downloads |
236
+ |:------|-----:|:-----|----------:|
237
+ | **Coder Browser (this model)** β¬… | 3.09 GB | Browser agent (merged) | 0 |
238
+ | [Context 1.5B Merged](https://huggingface.co/Nanthasit/sakthai-context-1.5b-merged) | 3.09 GB | Merged weights (flagship) | 1,599 |
239
+ | [Context 0.5B Merged](https://huggingface.co/Nanthasit/sakthai-context-0.5b-merged) | 988 MB | Merged weights (edge) | 1,370 |
240
+ | [Context 7B Merged](https://huggingface.co/Nanthasit/sakthai-context-7b-merged) | 15.2 GB | Merged weights (power) | 744 |
241
+ | [Context 7B 128K](https://huggingface.co/Nanthasit/sakthai-context-7b-128k) | config-only | YaRN long-context recipe | 506 |
242
+ | [Context 7B Tools](https://huggingface.co/Nanthasit/sakthai-context-7b-tools) | 20.2 MB | LoRA adapter | 399 |
243
+ | [Embedding Multilingual](https://huggingface.co/Nanthasit/sakthai-embedding-multilingual) | 471 MB | Embedding model | 362 |
244
+ | [Context 1.5B Tools v1](https://huggingface.co/Nanthasit/sakthai-context-1.5b-tools) | ~8.75 MB | LoRA adapter (v1) | 349 |
245
+ | [Vision 7B](https://huggingface.co/Nanthasit/sakthai-vision-7b) | 4.08 GB | Vision-language (GGUF) | 186 |
246
+ | [TTS Model](https://huggingface.co/Nanthasit/sakthai-tts-model) | 141 MB | Kokoro-82M TTS (GGUF) | 150 |
247
+ | [Context 0.5B Tools](https://huggingface.co/Nanthasit/sakthai-context-0.5b-tools) | 988 MB | Merged weights | 94 |
248
+ | [Coder 1.5B](https://huggingface.co/Nanthasit/sakthai-coder-1.5b) | 1.12 GB | Code model (GGUF) | 93 |
249
+ | [Context 1.5B Merged v2](https://huggingface.co/Nanthasit/sakthai-context-1.5b-merged-v2) | 3.09 GB | Merged weights | 0 |
250
+ | [Context 1.5B Tools v2](https://huggingface.co/Nanthasit/sakthai-context-1.5b-tools-v2) | 73.9 MB | LoRA adapter | 0 |
251
+ | [Coder Browser GGUF](https://huggingface.co/Nanthasit/sakthai-coder-browser-gguf) | 7.11 GB | Browser agent F16 GGUF | 0 |
252
+ | [Coder Browser LoRA](https://huggingface.co/Nanthasit/sakthai-coder-browser-lora) | 73.9 MB | LoRA adapter | 0 |
253
+ | [Plus 1.5B](https://huggingface.co/Nanthasit/sakthai-plus-1.5b) | 3.09 GB | Merged weights | 0 |
254
+ | [Plus 1.5B LoRA](https://huggingface.co/Nanthasit/sakthai-plus-1.5b-lora) | 73.9 MB | LoRA adapter | 0 |
255
+ | [Plus 1.5B Coder](https://huggingface.co/Nanthasit/sakthai-plus-1.5b-coder) | β€” | Planned (no weights yet) | 0 |
256
+
257
+ ---
258
+
259
+ ## Limitations
260
 
261
+ - **Text-only** β€” cannot see images or screenshots (use [sakthai-vision-7b](https://huggingface.co/Nanthasit/sakthai-vision-7b) for vision tasks)
262
+ - **Benchmark status open** β€” the GGUF Q4_K_M probe produced 0 tokens; the Transformers path needs a proper multi-trial evaluation before any quality claim
263
+ - **English only** β€” trained primarily on English web data
264
+ - **Context-limited** β€” best results with page content ≀ 4K tokens per interaction
265
+ - **Not servable on HF serverless inference** β€” no provider supports this custom fine-tune (router 404 verified); run locally or via an Endpoint/GGUF
266
 
267
  ---
268
 
269
+ *Part of the [SakThai Model Family](https://huggingface.co/collections/Nanthasit/sakthai-model-family-6a64745450b12d421c1f9f02). Built with love, tears, and zero budget. From a shelter in Cork, Ireland, to the world.*