Skip to contents

Setup

dragon_check()
Check the Python environment and hardware
dragon_python_requirements()
Python requirements used by dragonfarm
dragon_presets()
Recommended base models

Documents

Drop in documents, ask them questions, write and review training questions, build the training set.

dragon_documents()
Read documents into a document set
dragon_documents_load()
Reopen a saved document set
dragon_documents_list()
List saved document sets
dragon_example_documents()
Example documents
dragon_chunks()
The chunks of a document set
dragon_index()
Index a document set for retrieval
dragon_retrieve()
Find the chunks most relevant to a question
dragon_ask()
Ask a question of your documents
dragon_ellmer_tools()
dragonfarm's tools for an ellmer chat or an MCP client
dragon_mcp_server()
Serve dragonfarm's tools to MCP clients
dragon_questions() dragon_questions_progress() dragon_questions_wait()
Write questions and answers from a document set
dragon_questions_load() dragon_questions_save() dragon_questions_list()
Load, save, and list question sets
dragon_questions_dataset()
Training data from reviewed questions

Data

dragon_dataset()
Create a dataset for fine-tuning
dragon_map()
Map dataset columns to prompt, response, and system text
dragon_map_pairs()
Map columns for preference optimization
dragon_map_prompts()
Map columns for reinforcement learning
dragon_conversations()
Multi-turn conversations as training data
dragon_synthesize()
Write fine-tuning data with a teacher model
dragon_synthesize_pairs()
Build preference pairs from a model's own samples
dragon_prompts()
Prompts from a run's data files
dragon_preview()
Preview mapped rows as chat turns
dragon_split()
Hold out rows for evaluation
dragon_example_data()
Path to the bundled example dataset

Settings

dragon_lora()
LoRA settings
dragon_train_args()
Training settings
dragon_hardware()
Hardware settings

Training stages

dragon_train()
Fine-tune a model with LoRA
dragon_prefer()
Preference optimization with DPO or ORPO
dragon_reinforce()
Reinforcement learning with verifiable rewards (GRPO)
dragon_reward()
Verifiable rewards for reinforcement learning
dragon_resume()
Resume a run from its latest checkpoint
dragon_wait()
Wait for a run to finish
dragon_cancel()
Cancel a run

Runs

dragon_run()
Reopen an existing run
dragon_runs()
List runs
dragon_archived_runs()
Archived runs
dragon_archive_run() dragon_unarchive_run() dragon_delete_run()
Archive, restore, or delete a run
dragon_runs_dir()
Directory where runs are stored
dragon_status() dragon_progress() dragon_logs()
Inspect a run
dragon_code()
R code that reproduces a run

Evaluation

dragon_evaluate()
Evaluate a finished run
dragon_metrics() dragon_metric_regex()
Task metrics for generated replies
dragon_judge()
Judge a run's replies with a language model
dragon_llm_anthropic() dragon_judge_anthropic() dragon_llm_ellmer() dragon_judge_ellmer()
Language models as functions: the Claude API and ellmer
dragon_compare()
Compare runs side by side

Inference and chat

dragon_backend_local() dragon_backend_server() dragon_backend_ollama() dragon_backend()
Inference backends
dragon_serve_ollama()
Serve a run's model with Ollama
dragon_worker_stop()
Stop the local inference worker
dragon_chat() dragon_chat_load()
Talk to a model, with memory of the conversation
dragon_feedback()
Training data from chat feedback

After training

dragon_generate()
Generate replies from a fine-tuned model
dragon_merge()
Merge the adapter into the base model
dragon_export_gguf()
Export a merged model to GGUF
dragon_publish()
Push a run's model to the Hugging Face Hub

Pipelines

Cloud GPUs

dragon_bundle()
Package a run for a cloud GPU
dragon_remote()
Open a cloud GPU provider for a bundled run
dragon_import()
Import results trained on another machine
dragon_remote_providers()
Cloud GPU providers

App

dragon_app()
Launch the dragonfarm app