Text Generation
Transformers
Safetensors
English
qwen2
qwen2.5
qwen2.5-coder
sakthai
house-of-sak
browser-automation
web-agent
tool-calling
function-calling
tool-use
agent
code-generation
finetuned
finetune
sft
merged
conversational
Eval Results (legacy)
Eval Results
text-generation-inference
Instructions to use Nanthasit/sakthai-coder-browser with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Nanthasit/sakthai-coder-browser with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Nanthasit/sakthai-coder-browser") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Nanthasit/sakthai-coder-browser") model = AutoModelForCausalLM.from_pretrained("Nanthasit/sakthai-coder-browser", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Nanthasit/sakthai-coder-browser with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Nanthasit/sakthai-coder-browser" # 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-coder-browser", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Nanthasit/sakthai-coder-browser
- SGLang
How to use Nanthasit/sakthai-coder-browser 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-coder-browser" \ --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-coder-browser", "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-coder-browser" \ --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-coder-browser", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Nanthasit/sakthai-coder-browser with Docker Model Runner:
docker model run hf.co/Nanthasit/sakthai-coder-browser
docs: add reproduce eval/train sections, keep honest broken-state disclosure
Browse files
README.md
CHANGED
|
@@ -27,7 +27,6 @@ tags:
|
|
| 27 |
base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
|
| 28 |
datasets:
|
| 29 |
- Nanthasit/sakthai-combined-v8
|
| 30 |
-
- Nanthasit/sakthai-combined-v8
|
| 31 |
- Nanthasit/sakthai-combined-v11
|
| 32 |
- Nanthasit/sakthai-irrelevance-supplement
|
| 33 |
- Nanthasit/cycle-bench
|
|
@@ -297,6 +296,54 @@ One of **25 public model repos** in the [SakThai Model Family collection](https:
|
|
| 297 |
|
| 298 |
---
|
| 299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
## Limitations
|
| 301 |
|
| 302 |
- **BROKEN weights** — all 84 attention bias tensors are corrupted by a faulty LoRA merge (see [Evaluation & Status](#evaluation--status)); do not deploy until re-merged and re-verified
|
|
|
|
| 27 |
base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
|
| 28 |
datasets:
|
| 29 |
- Nanthasit/sakthai-combined-v8
|
|
|
|
| 30 |
- Nanthasit/sakthai-combined-v11
|
| 31 |
- Nanthasit/sakthai-irrelevance-supplement
|
| 32 |
- Nanthasit/cycle-bench
|
|
|
|
| 296 |
|
| 297 |
---
|
| 298 |
|
| 299 |
+
## Reproduce Evaluation
|
| 300 |
+
|
| 301 |
+
If you want to verify the broken-state diagnosis locally, run the same llama.cpp probe used for this card:
|
| 302 |
+
|
| 303 |
+
```bash
|
| 304 |
+
# Convert the current merged weights to GGUF Q4_K_M
|
| 305 |
+
python -m scripts.convert_hf_to_gguf --outfile sakthai-coder-browser-q4_k_m.gguf --quant-type Q4_K_M ./sakthai-coder-browser
|
| 306 |
+
|
| 307 |
+
# 3-trial probe, 2 threads, CPU only
|
| 308 |
+
for seed in 7 42 1337; do
|
| 309 |
+
./llama-cli -m sakthai-coder-browser-q4_k_m.gguf \
|
| 310 |
+
-p "$(cat prompts/browser_tool_call.txt)" \
|
| 311 |
+
-n 256 --temp 0.3 -t 2 --seed $seed
|
| 312 |
+
done
|
| 313 |
+
```
|
| 314 |
+
|
| 315 |
+
All 3 trials should return 0 output tokens if the weight corruption is still present.
|
| 316 |
+
If they produce normal `<tool_call>` JSON blocks, the repo has been repaired.
|
| 317 |
+
|
| 318 |
+
---
|
| 319 |
+
|
| 320 |
+
## Reproduce Training / Merge
|
| 321 |
+
|
| 322 |
+
The merged weights were produced by applying the LoRA adapter onto `Qwen/Qwen2.5-Coder-1.5B-Instruct`. To reproduce or repair:
|
| 323 |
+
|
| 324 |
+
```bash
|
| 325 |
+
git clone https://huggingface.co/Nanthasit/sakthai-coder-browser-lora adapter
|
| 326 |
+
python -m peft.merge_and_unload \
|
| 327 |
+
--base_model Qwen/Qwen2.5-Coder-1.5B-Instruct \
|
| 328 |
+
--adapter adapter \
|
| 329 |
+
--output repaired-merged \
|
| 330 |
+
--safe
|
| 331 |
+
```
|
| 332 |
+
|
| 333 |
+
Important: zero-out attention-projection biases after merge if the base initializes them to zero:
|
| 334 |
+
|
| 335 |
+
```python
|
| 336 |
+
from transformers import AutoModelForCausalLM
|
| 337 |
+
model = AutoModelForCausalLM.from_pretrained("repaired-merged", trust_remote_code=True)
|
| 338 |
+
for name, param in model.named_parameters():
|
| 339 |
+
if "bias" in name and "attn" in name and "k_proj" in name:
|
| 340 |
+
param.data.zero_()
|
| 341 |
+
```
|
| 342 |
+
|
| 343 |
+
Run the eval probe again before publishing.
|
| 344 |
+
|
| 345 |
+
---
|
| 346 |
+
|
| 347 |
## Limitations
|
| 348 |
|
| 349 |
- **BROKEN weights** — all 84 attention bias tensors are corrupted by a faulty LoRA merge (see [Evaluation & Status](#evaluation--status)); do not deploy until re-merged and re-verified
|