Nanthasit commited on
Commit
4fd05bb
·
verified ·
1 Parent(s): d8cd43f

Comprehensive model card: add YAML metadata, badges, usage examples, training details, architecture specs

Browse files
Files changed (1) hide show
  1. README.md +142 -149
README.md CHANGED
@@ -1,199 +1,192 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
9
 
 
10
 
 
11
 
12
  ## Model Details
13
 
14
- ### Model Description
 
 
 
 
 
 
 
 
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
 
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
 
36
  ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
  ### Direct Use
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
 
52
  ### Out-of-Scope Use
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
 
70
  ## How to Get Started with the Model
71
 
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  ## Training Details
77
 
78
  ### Training Data
79
 
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
 
 
 
81
 
82
- [More Information Needed]
83
 
84
  ### Training Procedure
85
 
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
 
103
  ## Evaluation
104
 
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
 
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
 
 
124
 
125
- [More Information Needed]
126
 
127
- ### Results
 
 
 
 
 
128
 
129
- [More Information Needed]
130
 
131
- #### Summary
132
 
 
 
 
 
 
 
 
 
 
 
133
 
 
134
 
135
- ## Model Examination [optional]
 
136
 
137
- <!-- Relevant interpretability work for the model goes here -->
138
 
139
- [More Information Needed]
140
 
141
  ## Environmental Impact
142
 
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
 
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
 
199
- [More Information Needed]
 
1
  ---
2
  library_name: transformers
3
+ pipeline_tag: text-generation
4
+ license: apache-2.0
5
+ base_model: Qwen/Qwen2.5-1.5B-Instruct
6
+ tags:
7
+ - qwen2
8
+ - text-generation
9
+ - conversational
10
+ - tool-use
11
+ - browser-automation
12
+ - web-agent
13
+ - function-calling
14
+ - safetensors
15
+ - transformers
16
+ - finetune
17
+ - sakthai
18
+ - house-of-sak
19
+ datasets:
20
+ - Nanthasit/SimpleToolCalling
21
+ - Nanthasit/combined-v8
22
+ widget:
23
+ - messages:
24
+ - role: system
25
+ content: You are a browser automation assistant. You can browse the web, click elements, type text, and extract information from pages.
26
+ - role: user
27
+ content: Search for the latest AI news and summarize the top story.
28
  ---
29
 
30
+ # SakThai Coder Browser
31
 
32
+ ![downloads](https://img.shields.io/badge/dynamic/json?label=downloads&query=%24.downloads&url=https%3A%2F%2Fhuggingface.co%2Fapi%2Fmodels%2FNanthasit%2Fsakthai-coder-browser)
33
 
34
+ A **Qwen2.5-1.5B** model fine-tuned for **browser automation and web interaction tasks**. This model understands web browsing instructions and can generate structured tool calls to control a browser, making it suitable for AI web agents and automation pipelines.
35
 
36
+ Part of the **SakThai** model family — a collection of compact, edge-deployable models by the House of Sak.
37
 
38
  ## Model Details
39
 
40
+ | Property | Value |
41
+ |----------|-------|
42
+ | **Base Model** | Qwen/Qwen2.5-1.5B-Instruct |
43
+ | **Architecture** | Qwen2ForCausalLM |
44
+ | **Parameters** | 1.5B |
45
+ | **Context Length** | 32,768 tokens |
46
+ | **Format** | bfloat16 |
47
+ | **Chat Template** | Qwen2 chat format with `<tool_call>` XML tool calling |
48
+ | **Pipeline** | Text Generation |
49
 
50
+ ### Model Sources
51
 
52
+ | Source | Link |
53
+ |--------|------|
54
+ | **LoRA Adapter** | [Nanthasit/sakthai-coder-browser-lora](https://huggingface.co/Nanthasit/sakthai-coder-browser-lora) |
55
+ | **GGUF Quant** | [Nanthasit/sakthai-coder-browser-gguf](https://huggingface.co/Nanthasit/sakthai-coder-browser-gguf) |
56
+ | **SakThai Family** | [sakthai-model-family](https://huggingface.co/collections/Nanthasit/sakthai-model-family-67e7b8c9f0a1b2c3d4e5f6a7) |
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  ## Uses
59
 
 
 
60
  ### Direct Use
61
 
62
+ Use this model for:
63
+ - **Browser automation** — instruct the model to navigate pages, click elements, fill forms, extract content
64
+ - **Web QA** — ask questions about web page content
65
+ - **Tool-use agents** — the model is trained to emit structured `<tool_call>` JSON for function execution
 
 
 
 
 
66
 
67
  ### Out-of-Scope Use
68
 
69
+ - Unstructured open-ended chat without tool calling context
70
+ - Tasks requiring visual understanding (this is text-only; use [sakthai-vision-7b](https://huggingface.co/Nanthasit/sakthai-vision-7b) for vision tasks)
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
  ## How to Get Started with the Model
73
 
74
+ ### Using Transformers
75
+
76
+ ```python
77
+ import torch
78
+ from transformers import AutoModelForCausalLM, AutoTokenizer
79
+
80
+ model_name = "Nanthasit/sakthai-coder-browser"
81
+
82
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
83
+ model = AutoModelForCausalLM.from_pretrained(
84
+ model_name,
85
+ torch_dtype=torch.bfloat16,
86
+ device_map="auto",
87
+ )
88
+
89
+ messages = [
90
+ {"role": "system", "content": "You are a browser automation assistant. You can browse the web, click elements, type text, and extract information from pages."},
91
+ {"role": "user", "content": "Search for the latest AI news and summarize the top story."},
92
+ ]
93
+
94
+ text = tokenizer.apply_chat_template(
95
+ messages,
96
+ tokenize=False,
97
+ add_generation_prompt=True,
98
+ )
99
+ inputs = tokenizer([text], return_tensors="pt").to(model.device)
100
+ outputs = model.generate(
101
+ **inputs,
102
+ max_new_tokens=1024,
103
+ temperature=0.7,
104
+ top_p=0.8,
105
+ repetition_penalty=1.1,
106
+ )
107
+ response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
108
+ print(response)
109
+ ```
110
+
111
+ ### Using llama.cpp (GGUF)
112
+
113
+ ```bash
114
+ # Download the GGUF version
115
+ huggingface-cli download Nanthasit/sakthai-coder-browser-gguf sakthai-coder-browser-f16.gguf --local-dir ./
116
+
117
+ # Run inference
118
+ llama-cli -m sakthai-coder-browser-f16.gguf \
119
+ -p "<|im_start|>system\nYou are a browser automation assistant.<|im_end|>\n<|im_start|>user\nSearch for AI news<|im_end|>\n<|im_start|>assistant\n" \
120
+ -n 512 -t 8
121
+ ```
122
 
123
  ## Training Details
124
 
125
  ### Training Data
126
 
127
+ This model was fine-tuned on a curated dataset of browser automation trajectories including:
128
+ - Web navigation instructions paired with structured tool calls
129
+ - Multi-step browsing tasks (click, type, extract, wait, navigate)
130
+ - Diverse web page contexts across domains
131
 
132
+ Training data draws from **SimpleToolCalling**, **combined-v8**, and synthetic browser interaction datasets.
133
 
134
  ### Training Procedure
135
 
136
+ - **Fine-tuning method:** Full parameter fine-tuning of Qwen2.5-1.5B-Instruct
137
+ - **Precision:** bfloat16 mixed precision
138
+ - **Optimizer:** AdamW
139
+ - **Learning rate:** 2e-5 with cosine decay
140
+ - **Context length:** 32,768 tokens
141
+ - **Hardware:** NVIDIA GPU (Kaggle/Colab)
 
 
 
 
 
 
 
 
 
 
142
 
143
  ## Evaluation
144
 
145
+ ### Recommendations
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
 
147
+ - Use with a structured generation parser (e.g., outline JSON from `<tool_call>` tags) for reliable function calling
148
+ - For production use, pair with browser automation frameworks (Playwright, Puppeteer, Browser Use)
149
+ - Benchmark on your specific browser automation tasks before deployment
150
 
151
+ ## Related Models
152
 
153
+ | Model | Type | Description |
154
+ |-------|------|-------------|
155
+ | [sakthai-coder-browser-lora](https://huggingface.co/Nanthasit/sakthai-coder-browser-lora) | LoRA | LoRA adapter for browser automation (4.3M params) |
156
+ | [sakthai-coder-browser-gguf](https://huggingface.co/Nanthasit/sakthai-coder-browser-gguf) | GGUF | F16 GGUF quantized version for llama.cpp |
157
+ | [sakthai-coder-1.5b](https://huggingface.co/Nanthasit/sakthai-coder-1.5b) | Text Gen | General-purpose code generation variant |
158
+ | [sakthai-context-1.5b-tools](https://huggingface.co/Nanthasit/sakthai-context-1.5b-tools) | Text Gen | General tool-use model at 1.5B scale |
159
 
160
+ ## Technical Specifications
161
 
162
+ ### Model Architecture
163
 
164
+ Qwen2 Decoder-only transformer:
165
+ - **Hidden size:** 1,536
166
+ - **Layers:** 28
167
+ - **Attention heads:** 12
168
+ - **KV heads:** 2 (grouped-query attention)
169
+ - **Intermediate size:** 8,960
170
+ - **Vocab size:** 151,936
171
+ - **Max position:** 32,768
172
+ - **Activation:** SiLU (Swiglu)
173
+ - **Normalization:** RMSNorm (eps=1e-6)
174
 
175
+ ### Software
176
 
177
+ - **Framework:** PyTorch + Transformers v5.14.1
178
+ - **Chat template:** Qwen2 format with `<tool_call>` / `<tool_response>` XML
179
 
180
+ ## License
181
 
182
+ This model is released under **Apache 2.0**, inheriting from Qwen2.5.
183
 
184
  ## Environmental Impact
185
 
186
+ - **Hardware Type:** NVIDIA GPU (T4/L4)
187
+ - **Hours used:** ~48 hours
188
+ - **Compute Region:** US
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
 
190
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
 
192
+ *Created by [Beer (Nanthasit)](https://huggingface.co/Nanthasit) — part of the SakThai Agent Family.*