File size: 4,532 Bytes
a1cf210
 
 
 
510f030
a1cf210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9c23ce3
 
510f030
a1cf210
1182125
 
a1cf210
 
 
 
 
 
 
1182125
 
a1cf210
 
 
 
 
1182125
 
 
a1cf210
1182125
 
 
a1cf210
 
 
1182125
 
a1cf210
 
1182125
 
a1cf210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1182125
 
 
a1cf210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
license: apache-2.0
language:
- en
pretty_name: Qwen4Max-Hy4Flash-Distill
size_categories:
- 1K<n<10K
task_categories:
- text-generation
tags:
- agent
- agentic-coding
- tool-use
- distillation
- sft
- code
- software-engineering
- opencode
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*.jsonl
---

![Qwen4Max-Hy4Flash-Distill](https://huggingface.co/datasets/ortexvortex/Qwen4Max-Hy4Flash-Distill/resolve/main/assets/banner.svg)

# Qwen4Max-Hy4Flash-Distill

8,529 multi-turn agentic coding trajectories for supervised fine-tuning. Every trajectory was **verified by
running the repository's test suite**, and only passing runs are included.

The trajectories were recorded from two teacher models working inside the [OpenCode](https://opencode.ai)
agent harness on real open-source Python repositories, with full tool use (read, edit, write, grep, bash, ...)
and the teachers' reasoning:

| teacher | examples |
|---|---|
| Hy4 Flash (high reasoning) | 7,441 |
| Qwen4 Max (xhigh reasoning) | 1,088 |

## Task kinds

| kind | examples | what the agent gets |
|---|---|---|
| `single` | 2,120 | a GitHub-style bug report for one injected bug; fix it |
| `multi` | 2,237 | a report covering several bugs across files; fix all |
| `implement` | 2,269 | a function body was removed; implement it from the docstring / issue |
| `multi_impl` | 243 | several stubbed functions to implement together |
| `tdd_fix` | 461 | failing test output only; find and fix the cause |
| `test_only` | 619 | a bug with no description beyond failing tests |
| `write_test` | 580 | write tests that catch a described bug |

Bugs are AST mutations (negated conditions, swapped arguments, removed statements, flipped comparisons, ...)
and LLM-written realistic rewrites, applied to lines that the repo's own tests cover. Issue texts were written
by an LLM from the diff and are written not to reveal the fix. A task passes only if the previously failing
tests pass and no previously passing test breaks.

**Diversity:** 54 repositories (arrow, attrs, click, jinja, lark, marshmallow, mpmath, networkx, pyparsing,
sqlparse, textual, tomlkit, werkzeug, yapf, ...); the five largest repos together make up 15% of examples.
On average 22 assistant turns per trajectory.

## Format

JSON Lines, one trajectory per line:

```json
{
  "id": "arrow-018235b1a59d",
  "repo": "arrow",
  "kind": "single",
  "teacher": "Hy4 Flash",
  "teacher_provider": "opencode-go",
  "n_turns": 17,
  "prompt_tokens": 197504,
  "completion_tokens": 3878,
  "messages": [
    {"role": "system", "content": "..."},
    {"role": "user", "content": "..."},
    {"role": "assistant", "content": "", "reasoning_content": "...",
     "tool_calls": [{"id": "...", "type": "function",
                     "function": {"name": "read", "arguments": {"filePath": "..."}}}]},
    {"role": "tool", "tool_call_id": "...", "content": "..."},
    ...
  ],
  "tools": [ ... OpenAI-style function schemas ... ]
}
```

- `messages` is in the OpenAI / Hugging Face chat format. Assistant turns carry the teacher's reasoning in
  `reasoning_content`; tool-call `arguments` are JSON objects (not strings).
- `tools` holds the exact tool schemas the teacher was given.
- `prompt_tokens` / `completion_tokens` are the teacher's usage summed over the trajectory.
- The system prompt is OpenCode's default agent prompt **without** its "# Your Model" block (which normally
  names the serving model). Add your own model's identity there if you want it. Trajectories in which the
  model named itself were removed, so the data is not tied to any particular model identity.
- Trajectories are long: roughly 15% exceed 40k tokens (mostly `multi` and `implement`); filter by length
  for your context window.

## Licensing and terms

The dataset card is Apache-2.0. Two things inside it come with their own terms, which you must follow too:

- **Teacher outputs:** assistant turns were generated by Hy4 Flash (Tencent) and Qwen4 Max (Alibaba). Check
  those models' terms of use for training on their outputs before using this data.
- **Repository code:** tool outputs contain source code from the 54 open-source repositories, each under its
  own license (mostly MIT, BSD and Apache-2.0).

## Limitations

- Python only, single-repository tasks with injected bugs; real-world issues are messier.
- Only successful trajectories are kept, so the data shows no recovery from failed final attempts.
- Teacher reasoning is included as produced and can be long or wander.