Model Details
Table | |
|---|
| Base model | TaimoorSiddiqui/Hopcoder-Mini-9B |
| Stage-1 adapter | TaimoorSiddiqui/Hopcoder-Mini-9B-Native-ToolCall-LoRA-H200 |
| Adapter type | LoRA (r=16, alpha=32) |
| Training hardware | NVIDIA H200 (Modal) |
| Training time | ~3h 47m |
| Total steps | 659 (1 epoch) |
| Eval loss | 0.4701 (step 200) |
| Learning rate | 2.0e-5 |
| Batch size | 2 × grad_accum 8 = 16 effective |
| Max sequence length | 4096 |
Training Data
Table with columns: Source, Examples| Source | Examples |
|---|
| Open-SWE patches | 5,489 |
| xLAM function-calling | 1,200 |
| Hermes function-calling | 341 |
| Targeted CLI tool-call replay | 3,840 |
| Total | 10,870 |
The model uses a custom XML-like format for tool calls (not JSON):
<function=tool_name>
<parameter=param_name>
param_value
</parameter>
</function>
Multiple tool calls are separated by newlines. This format was introduced in Stage-1 and reinforced in Stage-2.
Benchmark Results
Both benchmarks were run on a Modal H200 container loading the base model + adapter with bfloat16 precision.
The native benchmark evaluates 40 tool-use cases (5 per tool across 8 tools) and 4 no-tool cases.
Table with columns: Metric, Score| Metric | Score |
|---|
| Correct tool selection | 79.5% |
| Required args present | 88.6% |
| Native format valid | 100.0% |
| Correct call count | 88.6% |
| JSON params valid | 100.0% |
| No old JSON format | 100.0% |
| No markdown fences | 100.0% |
| Balanced tags | 100.0% |
Table with columns: Tool, Accuracy, Args Present, Correct/Total| Tool | Accuracy | Args Present | Correct/Total |
|---|
ask_user_question | 100.0% | 100.0% | 5/5 |
edit | 100.0% | 100.0% | 5/5 |
glob | 100.0% | 100.0% | 5/5 |
|
2. BFCL-Compatible Evaluation (10 cases)
The BFCL-style evaluation tests general function-calling with unseen tools (weather, flights, email, stocks, etc.).
Table with columns: Metric, Score| Metric | Score |
|---|
| Correct tool selection | 100.0% |
| Native format valid | 100.0% |
| No old JSON format | 100.0% |
All 10 BFCL test cases passed with perfect tool selection and format compliance.
Key Findings
- Perfect format compliance — 100% native XML format, zero legacy JSON, zero markdown fences, zero extra prose. The Stage-2 adapter fully internalized the native tool-call format.
- Strong general tool selection — 6 of 8 tools scored 100% accuracy.
ask_user_question, edit, glob, read_file, run_shell_command, and todo_write are fully reliable.
- Generalization to unseen tools — The 100% BFCL score confirms the model generalizes its tool-calling ability to functions it has never seen during training.
- Weaknesses identified:
search_code (40%) — the model sometimes substitutes grep_search instead of search_code, or calls with -style arguments.
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = "TaimoorSiddiqui/Hopcoder-Mini-9B"
adapter_repo = "TaimoorSiddiqui/Hopcoder-Mini-9B-SWE-Agent-LoRA-H200"
tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(base_model, torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(model, adapter_repo)
Files
Table with columns: File, Description| File | Description |
|---|
adapter_config.json | LoRA configuration |
adapter_model.safetensors | Adapter weights |
stage2_benchmark_results.json | Combined benchmark results (native + BFCL) |
stage2_native_benchmark.json | Full native tool-call benchmark with per-case details |
stage2_bfcl_eval.json | Full BFCL evaluation with per-case details |
Citation
@misc{hopcoder-mini-9b-swe-agent-lora-h200,
author = {TaimoorSiddiqui},
title = {HopCoder-Mini-9B SWE-Agent LoRA H200},
year = {2026},
url = {https://huggingface.co/TaimoorSiddiqui/Hopcoder-Mini-9B-SWE-Agent-LoRA-H200}
}
License
This adapter inherits the license of the base model TaimoorSiddiqui/Hopcoder-Mini-9B.