lordx64 commited on
Commit
b9f8ee2
·
verified ·
1 Parent(s): f3e2d9e

Initial commit: Fable-5 tool-use SFT (prepared for Qwable-v2)

Browse files
Files changed (2) hide show
  1. README.md +116 -0
  2. data/train-00000-of-00001.parquet +3 -0
README.md ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: agpl-3.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - agentic
7
+ - tool-use
8
+ - distillation
9
+ - claude
10
+ - claude-fable-5
11
+ - agent-traces
12
+ - sft
13
+ - qwen-chat-template
14
+ - qwable
15
+ task_categories:
16
+ - text-generation
17
+ size_categories:
18
+ - 100K<n<1M
19
+ configs:
20
+ - config_name: default
21
+ data_files:
22
+ - split: train
23
+ path: data/train-*.parquet
24
+ ---
25
+
26
+ # Fable-5 Tool-Use SFT — prepared for Qwable-v2 fine-tuning
27
+
28
+ 5,183 single-turn `(user → assistant-with-tool-use)` pairs from **Claude Fable-5** (Anthropic preview model, briefly public 2026-06-10 → 2026-06-22 before being suspended globally under U.S. export-control directives), reformatted into a single-`text`-column parquet ready for `SFTTrainer(dataset_text_field="text") + train_on_responses_only`.
29
+
30
+ **This is the scale companion to [`lordx64/agentic-distill-fable-5-sft`](https://huggingface.co/datasets/lordx64/agentic-distill-fable-5-sft)** (which has 4,659 reasoning+tool-use pairs from Glint-Research/Fable-5-traces). This dataset trades reasoning content for ~40x scale on tool-use only.
31
+
32
+ ## Why this dataset exists
33
+
34
+ The 2M-row source [`Glint-Research/Complete-FABLE.5-traces-2M`](https://huggingface.co/datasets/Glint-Research/Complete-FABLE.5-traces-2M) is captured raw Claude Code session events from the Fable-5 public window. It contains:
35
+ - ~28% of assistant rows: `thinking` blocks with **only the cryptographic signature** preserved (cleartext blocked by Anthropic's preview-model IP protection) → unusable for SFT
36
+ - ~53% of assistant rows: real **tool_use blocks** with signature-verified Fable-5 provenance → **usable** ✓
37
+ - ~1% of assistant rows: cleartext `thinking` but **without signatures** → suspect provenance (likely Sonnet fallback during quota, not Fable-5)
38
+
39
+ This dataset extracts the third category — real Fable-5 agentic tool calls — at scale.
40
+
41
+ ## Key difference from `agentic-distill-fable-5-sft`
42
+
43
+ | | `agentic-distill-fable-5-sft` (v1) | `fable-tool-use-sft` (this) |
44
+ |---|---|---|
45
+ | Rows | 4,659 | 5,183 |
46
+ | `<think>` block in assistant turn | ✓ (cleartext, added by Glint-Research post-hoc) | ✗ (omitted — would have to be empty) |
47
+ | Tool-use coverage | 81% of rows end in tool_use | 100% of rows end in tool_use |
48
+ | Distribution | One developer's narrow Claude Code sessions | Hundreds of real CC sessions from the FABLE.5 public window |
49
+
50
+ **Implication:** training on this dataset ALONE teaches tool-use format only; **the model will have no `<think>` reasoning capability** unless the base model already does. Use it for v2 by:
51
+ - **Warm-starting** from a reasoning-capable base (e.g. [`lordx64/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled`](https://huggingface.co/lordx64/Qwen3.6-35B-A3B-Claude-4.7-Opus-Reasoning-Distilled), same pattern as Qwable-v1)
52
+ - Or **mixing** with a reasoning corpus during SFT (e.g. include `lordx64/reasoning-distill-opus-4-7-max-sft` 20-30% by weight)
53
+
54
+ ## Row format
55
+
56
+ ```
57
+ <|im_start|>system
58
+ You are a coding agent. When you need to read, write, edit, or run code,
59
+ emit XML tool calls in this exact format:
60
+ <tool_use name="X" id="toolu_01abc">
61
+ {"...": "..."}
62
+ </tool_use>
63
+ Do NOT respond with markdown code blocks. Always use <tool_use> XML.<|im_end|>
64
+ <|im_start|>user
65
+ {user_or_tool_result}<|im_end|>
66
+ <|im_start|>assistant
67
+ {visible_text}<tool_use name="X" id="toolu_..."> {...} </tool_use><|im_end|>
68
+ ```
69
+
70
+ The system prompt matches the inference recipe documented on `lordx64/Qwable-v1` — training + inference align so the model emits the correct XML format on bare prompts.
71
+
72
+ ## What this repo adds on top of upstream
73
+
74
+ 1. **Format**: collapsed into a single `text` column with full Qwen chat template. Drop-in for `SFTTrainer(dataset_text_field="text")`.
75
+ 2. **Tool serialization**: `tool_use` blocks rendered as `<tool_use name="X" id="Y">…</tool_use>`; `tool_result` rendered as `<tool_result id="X" is_error="…">…</tool_result>`. Recoverable by a small regex (no Qwen-native `<tool_call>` tokens).
76
+ 3. **Filtering**:
77
+ - Dropped Claude Code's `<synthetic>` rate-limit injections
78
+ - Dropped assistant turns with no tool_use (this dataset is tool-use-only)
79
+ - Dropped assistant turns with empty visible content
80
+ 4. **Noise stripping**: removed Claude Code slash-command meta blocks (`<local-command-caveat>`, `<command-name>`, `<command-message>`, `<command-args>`, `<local-command-stdout>`) and ANSI escape codes from user-side content.
81
+ 5. **Secret scrubbing**: regex-redacted Groq/Anthropic/OpenAI/OpenRouter/HF/AWS/GitHub/Google API keys that leaked through `Read` of `.env` files in the original sessions.
82
+ 6. **Dedup**: SHA-256 over user-content (drops near-duplicate retried prompts).
83
+ 7. **Packaging**: single parquet under `data/train-*.parquet` for HF datasets auto-detection.
84
+
85
+ Source data and capture credit go entirely to upstream — we just shaped it for training.
86
+
87
+ ## Provenance chain
88
+
89
+ ```
90
+ Claude Code users ──── captured raw session JSONLs during the Fable-5
91
+ (multiple authors, public window (2026-06-10 → 2026-06-22), before
92
+ via `1EYE4ALL` capture) Anthropic suspended Fable-5 globally
93
+ │
94
+ ▼
95
+ 1EYE4ALL/Fable-5-traces ──── HF dataset of raw events
96
+ │
97
+ ▼
98
+ Crownelius/Complete- ──── deduplicated + cleaned (session-limit
99
+ FABLE.5-traces-2M answer-pattern rows removed)
100
+ │
101
+ ▼
102
+ Glint-Research/Complete- ──── re-host with provenance metadata
103
+ FABLE.5-traces-2M (`row_hash`, `first_source_dataset`, etc.)
104
+ │
105
+ ▼
106
+ lordx64/fable-tool-use-sft ──── this dataset: extract (user, asst-with-tool-use)
107
+ pairs, Qwen-template, scrub, dedup, push
108
+ ```
109
+
110
+ Authenticity is verified via the cryptographic signatures on the (redacted) thinking blocks — those signatures are valid Anthropic API output, unforgeable, and contain the `claude-fable-5` model_id when decoded. The tool_use blocks share the same signed envelope.
111
+
112
+ ## License & terms
113
+
114
+ Inherits **AGPL-3.0** from the upstream `Glint-Research/Complete-FABLE.5-traces-2M` redistribution. Downstream users running models trained on this dataset in a network-accessible service must comply with AGPL §13 (source disclosure for network use).
115
+
116
+ The underlying content is output from Anthropic's gated `claude-fable-5` preview model. Downstream users should verify compliance with [Anthropic's usage policies](https://www.anthropic.com/legal/usage-policy) for their specific use case before fine-tuning further or building commercial products.
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02d28f7f0a3cf3ab01c9075ff697215782b2f3af2ea98d861e3c313486126aa3
3
+ size 5523018