| dragon_bundle | R Documentation |
Writes a run directory exactly as dragon_train() would, but instead of
launching the trainer it zips everything a GPU machine needs: the data in
chat format, the configuration, the trainer's Python code, and a notebook
that runs it. Nothing is trained locally and Python is not needed.
dragon_bundle(
dataset,
model,
lora = dragon_lora(),
args = dragon_train_args(),
name = NULL,
run_dir = NULL,
runs_dir = dragon_runs_dir(),
n_samples = 10,
revision = NULL,
trust_remote_code = FALSE,
method = NULL,
beta = NULL,
rewards = NULL,
group_size = 4,
temperature = 1,
max_new_tokens = 128
)
dataset |
A mapped |
model |
A Hugging Face model id such as
|
lora |
LoRA settings from |
args |
Training settings from |
name |
Short label used in the run id. Defaults to the model name. |
run_dir |
Exact directory to use. Defaults to a timestamped directory
under |
runs_dir |
Parent directory for runs. See |
n_samples |
Number of held-out rows to generate sample replies for at the end of training. |
revision |
Model revision (branch, tag, or commit) on the Hub. |
trust_remote_code |
Allow the model repository to run custom code. |
method |
For a dataset mapped with |
beta |
Preference strength for |
rewards |
For a dataset mapped with |
group_size, temperature, max_new_tokens |
RL sampling settings. See
|
Continue with dragon_remote() to open a provider and see the steps, and
dragon_import() to bring the results back into this run directory.
A dragon_run whose state is "bundled".
if (interactive()) {
run <- dragon_dataset(dragon_example_data()) |>
dragon_map(prompt = "{subject}\n\n{body}", response = "reply") |>
dragon_bundle("Qwen/Qwen2.5-0.5B-Instruct")
dragon_remote(run, "colab")
# ... train in the browser, download the results zip ...
dragon_import(run, "~/Downloads/dragonfarm-results-<run id>.zip")
dragon_generate(run, "My thermostat keeps dropping off Wi-Fi.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.