CoolFace
Modelpublic

Nanthasit/sakthai-coder-browser-lora

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes10downloads
Model Card
## ARCHIVED / DEPRECATED This repository is deprecated and no longer maintained. superseded by sakthai-coder-browser (merged) It is kept for reproducibility only — prefer the replacement above. Removed from the SakThai model family collection.

<p align="center"> <strong>LoRA adapter for browser-automation agent training — Qwen2.5-Coder-1.5B-Instruct</strong><br/> <em>Part of the <a href="https://huggingface.co/collections/Nanthasit/sakthai-model-family-6a64745450b12d421c1f9f02">SakThai Model Family</a></em> </p>

<p align="center"> <a href="https://huggingface.co/Nanthasit"><img src="https://img.shields.io/badge/%F0%9F%A4%97-Nanthasit-6644cc" alt="Profile"/></a> <a href="https://github.com/beer-sakthai"><img src="https://img.shields.io/badge/GitHub-beer--sakthai-181717?logo=github" alt="GitHub"/></a> <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> <img src="https://img.shields.io/badge/license-Apache%202.0-green" alt="License"/> <img src="https://img.shields.io/badge/task-browser%20automation-ff6b6b" alt="Task"/> <img src="https://img.shields.io/badge/base-Qwen2.5--Coder--1.5B--Instruct-brightgreen" alt="Base Model"/> <a href="https://huggingface.co/Nanthasit/sakthai-coder-browser-lora"><img src="https://img.shields.io/badge/downloads-verifying-blue" alt="Downloads"/></a> </p>

Model Description

sakthai-coder-browser-lora is a LoRA adapter that teaches Qwen/Qwen2.5-Coder-1.5B-Instruct to act as a browser-automation agent. It is trained to emit structured tool calls for web navigation tasks, including click, scroll, search, extract, and form interaction. This repo does not include the base model weights; merge it onto the base model before inference.

Models in this family

ModelTypeNotes
sakthai-coder-browserMerged GGUF / TransformersProduction browser agent weights
sakthai-coder-1.5bBase/finetunedGeneral code agent
sakthai-context-1.5b-tools-v2Tools variantTool-calling focused sibling
sakthai-context-0.5b-toolsCompact toolsSmall footprint tool agent
sakthai-plus-1.5b-loraLoRAMerger + code variant

Training Details

  • Base model: Qwen/Qwen2.5-Coder-1.5B-Instruct
  • Adapter type: LoRA
  • LoRA config: r=16, alpha=32, dropout=0.05, rslora=true
  • Target modules: qproj, kproj, vproj, oproj, gateproj, upproj, down_proj
  • Datasets: sakthai-combined-v8, sakthai-combined-v11, irrelevance-supplement, cycle-bench
  • Trainer: TRL SFT
  • License: apache-2.0

Usage

Merge with PEFT

python
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base = "Qwen/Qwen2.5-Coder-1.5B-Instruct"
adapter = "Nanthasit/sakthai-coder-browser-lora"

tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, adapter)
model = model.merge_and_unload()  # optional; or keep adapter separate for switching

Inference with Ollama

bash
ollama create sakthai-coder-browser-lora -f ./Modelfile
# Adapter runtime merge depends on backend support; prefer merged sibling for Ollama.

Inference with llama.cpp GGUF

bash
# Preferred zero-cost local inference:
ollama run nanthasit/sakthai-coder-browser-gguf

Inference with Hugging Face InferenceClient

python
from huggingface_hub import InferenceClient

client = InferenceClient(model="Nanthasit/sakthai-coder-browser")
out = client.chat_completion(
    messages=[{"role": "user", "content": "Extract all H2 headings from https://example.com"}],
    max_tokens=256,
    temperature=0.3,
)
print(out.choices[0].message.content)

Reproducing Evaluation

python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-1.5B-Instruct", device_map="auto")
model = PeftModel.from_pretrained(base, "Nanthasit/sakthai-coder-browser-lora")
model = model.merge_and_unload()
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Coder-1.5B-Instruct")

prompt = "<tools>...</tools>\nUser: Search HuggingFace for DeepSeek V4 Flash"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
print(tokenizer.decode(model.generate(**inputs, max_new_tokens=256)[0], skip_special_tokens=True))

Inference Tips

  • Prefer merged weights (sakthai-coder-browser) for browser tasks.
  • Use low temperature (0.1–0.3) to reduce hallucinated tool names.
  • Always wrap function specs inside <tools> XML for reliable structured output.

Limitations

  • Adapter-only repo: cannot benchmark standalone; always merge onto the base model.
  • Web task success depends on DOM complexity and instruction phrasing.
  • Tool-calling accuracy drops on multi-step plans longer than 5 actions.
  • CPU inference is usable but slow; prefer GPU/TGI or llama.cpp GGUF for production.

Citation

bibtex
@misc{sakthai-coder-browser-lora,
  title  = {SakThai Coder Browser LoRA},
  author = {Nanthasit},
  year   = {2026},
  url    = {https://huggingface.co/Nanthasit/sakthai-coder-browser-lora}
}