Datasets and local fine-tuning tools for teaching language models to use radare2 accurately. The repository combines classic command examples, function-calling rows, verified workflows, generated command knowledge, source-grounded agentic knowledge, and human corrections.
Install a symlink to the checkout:
sudo make install
r2ai-model statusFine-tune the default Qwen preset from the datasets already present:
r2ai-model train --preset qwentrain is self-contained: it installs dependencies, compiles classic sources,
exports accepted memory, merges all training sources, fine-tunes, merges LoRA,
and exports GGUF. A separate merge or preflight is not required.
For an inexpensive safety check before a long run:
r2ai-model preflight --preset qwen
r2ai-model train --preset qwenUse the result through Ollama or llama.cpp:
r2ai-model chat --preset qwen
r2ai-model serve --preset qwen --port 8080classic + commands + agentic knowledge + human memory
|
merge
|
merged training JSONL
|
preflight or train
|
final model and GGUF
refresh-commands, learn, and review update source datasets. They do not
merge or fine-tune. datasets and status are read-only. train always
compiles and merges first.
# Read-only inventory
r2ai-model datasets
r2ai-model status
# Optional source-dataset growth
r2ai-model refresh-commands --ai off --no-queue-memory
r2ai-model learn
r2ai-model review
# Optional standalone merge or validation
r2ai-model merge
r2ai-model preflight --preset qwen
# Fine-tuning
r2ai-model train --preset qwenr2ai-model commands remains an alias for refresh-commands; despite the old
name, it rebuilds command training data rather than listing commands.
r2ai-model review
r2ai-model review memory --list
r2ai-model next --format json > question.json
r2ai-model answer < answer.jsonAccepted corrections are stored in data/memory/memory.jsonl and exported to
data/memory/verified.jsonl, which participates in the next merge or training
run.
- CLI and machinery: lifecycle, command effects, and recipes.
- Datasets: schemas, inventories, trust gates, and merge inputs.
- Command curriculum: radare2 help and verified workflows.
- Learning: agentic knowledge discovery and audit shards.
- Review: verification and pending human decisions.
- Memory: corrections and the batch-agent JSON protocol.
- Training: model configs, masking, splitting, and export.
- Make targets: lower-level automation and compatibility.
- Bug leads: why unconfirmed
R2BUGS.mdentries stay out of training. - AGENTS.md: concise operational rules for repository agents.
Run r2ai-model help or r2ai-model help <command> for live CLI help. Make
targets remain available through make help and make -C training help.
- Train from aggregate
verified.jsonlandknowledge.jsonlfiles, not every audit shard independently. - Keep failed or unresolved checks in pending queues.
- Keep generated bug leads out of training until manually confirmed and converted into reviewed rows.
- Do not commit virtual environments, merged training artifacts, model output directories, or GGUF files.