Downloads · 30 days
0
Aznaur/qwen3-8b-fix-git-v7-nat-examples
qwen3-8b-fix-git-v7-nat-examples is a machine learning model from Aznaur. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Based on paper: "Learning From Failure: Integrating Negative Examples when Fine-tuning Large Language Models as Agents" (arXiv 2402.11651)
Downloads · 30 days
0
Access
Public
Updated Jan 18, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json84.6 KB · 67%
From the Hugging Face model README
Based on paper: "Learning From Failure: Integrating Negative Examples when Fine-tuning Large Language Models as Agents" (arXiv 2402.11651)
Negative-Aware Training (NAT) is a technique that improves LLM agent performance by training on both:
The key insight: Models learn better when they see both what TO do and what NOT to do.
Positive and negative examples have different system prompts:
Positive prompt suffix:
<training_mode>
You are being shown a CORRECT example of how to solve this task.
Generate tool calls that follow the exact format shown, with only the required parameters.
Do NOT add extra parameters like message_title, message_description, or type.
When the task is complete, respond with a brief summary (NO tool call).
</training_mode>
Negative prompt suffix:
<training_mode>
WARNING: The following is an INCORRECT example that demonstrates common mistakes.
This trajectory contains errors such as:
- Adding unnecessary parameters (message_title, message_description)
- Looping on the same commands after task completion
- Using wrong command formats
Learn to AVOID these patterns.
</training_mode>
During inference, we use ONLY the positive prompt. The model has learned:
| Type | Count | Description |
|---|---|---|
| Positive | 4 | Claude's successful trajectory |
| Negative (hallucinated args) | 2 | Tool calls with extra message_title, message_description |
| Negative (looping) | 2 | Repeating commands after task completion |
| Negative (wrong command) | 2 | Using id as command value |
| Total | 10 |
{
"name": "shell_exec",
"arguments": "{\"id\": \"survey\", \"command\": \"pwd && ls -la && git status\", \"block\": true}"
}
{
"name": "shell_exec",
"arguments": "{\"id\": \"survey\", \"command\": \"pwd && ls -la && git status\", \"block\": true, \"message_title\": \"Survey\", \"message_description\": \"Performing system survey\"}"
}
Problem: Extra message_title and message_description parameters that don't exist in the tool schema.
After task is already complete (merge done, working tree clean), the model generates:
{
"name": "shell_exec",
"arguments": "{\"id\": \"loop_merge\", \"command\": \"git merge 650dba4 --no-ff -m \\\"Merge Stanford changes into master\\\"\", \"block\": true}"
}
Problem: Repeating the merge command when the task is already done.
{
"name": "shell_exec",
"arguments": "{\"id\": \"survey\", \"command\": \"survey\", \"block\": true}"
}
Problem: Using the id value as the command instead of an actual shell command.
From the paper:
tokenized_fix_git_v7_nat/
├── train.parquet # Training data (tokenized)
├── val.parquet # Validation data (tokenized)
├── README.md # This file
└── examples/ # Human-readable examples
├── positive_messages.json
├── negative_hallucinated.json
├── negative_looping.json
├── negative_wrong_cmd.json
├── positive_text.txt
└── negative_hallucinated_text.txt
torchrun --nproc_per_node=2 src/tbench_sft/tbench_sft.py \
--config src/tbench_sft/config/experiment_fix_git_overfit_v7_nat.yaml