diff --git a/.nojekyll b/.nojekyll index df3be972b..dfb6d68bb 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -4cff29b7 \ No newline at end of file +dc3808ad \ No newline at end of file diff --git a/docs/api/cli.args.html b/docs/api/cli.args.html index 54eb64d70..774f3cf67 100644 --- a/docs/api/cli.args.html +++ b/docs/api/cli.args.html @@ -589,9 +589,7 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true}); debug_num_examples=0, prompter=None, shard=False, - main_process_port=None, - num_processes=None, -) +)

Dataclass with CLI arguments for axolotl train command.

diff --git a/docs/api/cli.art.html b/docs/api/cli.art.html new file mode 100644 index 000000000..04cbd59d5 --- /dev/null +++ b/docs/api/cli.art.html @@ -0,0 +1,936 @@ + + + + + + + + + +cli.art – Axolotl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +
+ + + +
+ + + + +
+

cli.art

+

cli.art

+

Axolotl ASCII logo utils.

+
+

Functions

+ + + + + + + + + + + + + +
NameDescription
print_axolotl_text_artPrints axolotl ASCII art.
+
+

print_axolotl_text_art

+
cli.art.print_axolotl_text_art()
+

Prints axolotl ASCII art.

+ + +
+
+
+ +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/api/cli.delinearize_llama4.html b/docs/api/cli.delinearize_llama4.html new file mode 100644 index 000000000..836802f64 --- /dev/null +++ b/docs/api/cli.delinearize_llama4.html @@ -0,0 +1,970 @@ + + + + + + + + + +cli.delinearize_llama4 – Axolotl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +
+ + + +
+ + + + +
+

cli.delinearize_llama4

+

cli.delinearize_llama4

+

CLI tool to delinearize quantized/Linearized Llama-4 models.

+
+

Functions

+ + + + + + + + + + + + + +
NameDescription
do_cliConvert a patched HF format Llama4 model (with separated projections)
+
+

do_cli

+
cli.delinearize_llama4.do_cli(model, output)
+

Convert a patched HF format Llama4 model (with separated projections) +back to the original HF format (with fused projections).

+
+

Parameters

+ ++++++ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
modelUnion[Path, str]Path to the patched HF modelrequired
outputUnion[Path, str]Path to save the converted modelrequired
+ + +
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/api/cli.main.html b/docs/api/cli.main.html index d77a29755..d8cc1ca1b 100644 --- a/docs/api/cli.main.html +++ b/docs/api/cli.main.html @@ -560,16 +560,16 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true});

evaluate

-
cli.main.evaluate(config, accelerate, **kwargs)
+
cli.main.evaluate(ctx, config, launcher, **kwargs)

Evaluate a model.

Parameters

----++++ @@ -581,18 +581,24 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true}); + + + + + + - - - - + + + + - + @@ -645,16 +651,16 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true});

inference

-
cli.main.inference(config, accelerate, gradio, **kwargs)
+
cli.main.inference(ctx, config, launcher, gradio, **kwargs)

Run inference with a trained model.

Parameters

ctxclick.ContextClick context for extra args.required
config str Path to axolotl config YAML file. required
accelerateboolWhether to use accelerate launcher.
launcherstrLauncher to use for multi-GPU evaluation (“accelerate”, “torchrun”, or “python”). required
kwargs Additional keyword arguments which correspond to CLI args or axolotl config options.
----++++ @@ -666,24 +672,30 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true}); + + + + + + - - - - + + + + - + - + @@ -733,16 +745,16 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true});

merge_sharded_fsdp_weights

-
cli.main.merge_sharded_fsdp_weights(config, accelerate, **kwargs)
+
cli.main.merge_sharded_fsdp_weights(ctx, config, launcher, **kwargs)

Merge sharded FSDP model weights.

Parameters

ctxclick.ContextClick context for extra args.required
config str Path to axolotl config YAML file. required
accelerateboolWhether to use accelerate launcher.
launcherstrLauncher to use for multi-GPU inference (“accelerate”, “torchrun”, or “python”). required
gradio bool Whether to use Gradio browser interface or command line for inference. required
kwargs Additional keyword arguments which correspond to CLI args or axolotl config options.
----++++ @@ -754,18 +766,24 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true}); + + + + + + - - - - + + + + - + @@ -821,15 +839,22 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true});

train

-
cli.main.train(config, accelerate, cloud=None, sweep=None, **kwargs)
+
cli.main.train(
+    ctx,
+    config,
+    launcher='accelerate',
+    cloud=None,
+    sweep=None,
+    **kwargs,
+)

Train or fine-tune a model.

Parameters

ctxclick.ContextClick context for extra args.required
config str Path to axolotl config YAML file. required
accelerateboolWhether to use accelerate launcher.
launcherstrLauncher to use for weight merging (“accelerate”, “torchrun”, or “python”). required
kwargs Additional keyword arguments which correspond to CLI args or axolotl config options.
---+++ @@ -842,30 +867,36 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true}); + + + + + + - - - - - - + + + + + + - + - + - + - + diff --git a/docs/api/cli.utils.args.html b/docs/api/cli.utils.args.html new file mode 100644 index 000000000..a3ade4d0f --- /dev/null +++ b/docs/api/cli.utils.args.html @@ -0,0 +1,1088 @@ + + + + + + + + + +cli.utils.args – Axolotl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +
+ + + +
+ + + + +
+

cli.utils.args

+

cli.utils.args

+

Utilities for axolotl CLI args.

+
+

Functions

+
ctxclick.ContextClick context for extra args.required
config str Path to axolotl config YAML file. required
accelerateboolWhether to use accelerate launcher.required
launcherLiteral['accelerate', 'torchrun', 'python']Launcher to use for multi-GPU training (“accelerate”, “torchrun”, or “python”).'accelerate'
cloudOptional[str]str | None Path to a cloud accelerator configuration file None
sweepOptional[str]str | None Path to YAML config for sweeping hyperparameters. None
kwargs Additional keyword arguments which correspond to CLI args or axolotl config options.
+ + + + + + + + + + + + + + + + + + + + +
NameDescription
add_options_from_configCreate Click options from the fields of a Pydantic model.
add_options_from_dataclassCreate Click options from the fields of a dataclass.
filter_none_kwargsWraps function to remove None-valued kwargs.
+
+

add_options_from_config

+
cli.utils.args.add_options_from_config(config_class)
+

Create Click options from the fields of a Pydantic model.

+
+

Parameters

+ ++++++ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
config_classType[BaseModel]PyDantic model with fields to parse from the CLIrequired
+
+
+

Returns

+ + + + + + + + + + + + + + + +
NameTypeDescription
CallableFunction decorator for Axolotl CLI command.
+
+
+
+

add_options_from_dataclass

+
cli.utils.args.add_options_from_dataclass(config_class)
+

Create Click options from the fields of a dataclass.

+
+

Parameters

+ ++++++ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
config_classType[Any]Dataclass with fields to parse from the CLI.required
+
+
+

Returns

+ + + + + + + + + + + + + + + +
NameTypeDescription
CallableFunction decorator for Axolotl CLI command.
+
+
+
+

filter_none_kwargs

+
cli.utils.args.filter_none_kwargs(func)
+

Wraps function to remove None-valued kwargs.

+
+

Parameters

+ + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
funcCallableFunction to wrap.required
+
+
+

Returns

+ + + + + + + + + + + + + + + +
NameTypeDescription
CallableWrapped function.
+ + +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/docs/api/cli.utils.fetch.html b/docs/api/cli.utils.fetch.html new file mode 100644 index 000000000..5903df671 --- /dev/null +++ b/docs/api/cli.utils.fetch.html @@ -0,0 +1,976 @@ + + + + + + + + + +cli.utils.fetch – Axolotl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +
+ + + +
+ + + + +
+

cli.utils.fetch

+

cli.utils.fetch

+

Utilities for axolotl fetch CLI command.

+
+

Functions

+ + + + + + + + + + + + + +
NameDescription
fetch_from_githubSync files from a specific directory in the GitHub repository.
+
+

fetch_from_github

+
cli.utils.fetch.fetch_from_github(dir_prefix, dest_dir=None, max_workers=5)
+

Sync files from a specific directory in the GitHub repository. +Only downloads files that don’t exist locally or have changed.

+
+

Parameters

+ ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
dir_prefixstrDirectory prefix to filter files (e.g., ‘examples/’, ‘deepspeed_configs/’).required
dest_dirstr | NoneLocal destination directory.None
max_workersintMaximum number of concurrent downloads.5
+ + +
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/api/cli.utils.html b/docs/api/cli.utils.html index b592ede9c..4a4d16335 100644 --- a/docs/api/cli.utils.html +++ b/docs/api/cli.utils.html @@ -20,41 +20,6 @@ ul.task-list li input[type="checkbox"] { margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ vertical-align: middle; } -/* CSS for syntax highlighting */ -html { -webkit-text-size-adjust: 100%; } -pre > code.sourceCode { white-space: pre; position: relative; } -pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } -pre > code.sourceCode > span:empty { height: 1.2em; } -.sourceCode { overflow: visible; } -code.sourceCode > span { color: inherit; text-decoration: inherit; } -div.sourceCode { margin: 1em 0; } -pre.sourceCode { margin: 0; } -@media screen { -div.sourceCode { overflow: auto; } -} -@media print { -pre > code.sourceCode { white-space: pre-wrap; } -pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } -} -pre.numberSource code - { counter-reset: source-line 0; } -pre.numberSource code > span - { position: relative; left: -4em; counter-increment: source-line; } -pre.numberSource code > span > a:first-child::before - { content: counter(source-line); - position: relative; left: -1em; text-align: right; vertical-align: baseline; - border: none; display: inline-block; - -webkit-touch-callout: none; -webkit-user-select: none; - -khtml-user-select: none; -moz-user-select: none; - -ms-user-select: none; user-select: none; - padding: 0 4px; width: 4em; - } -pre.numberSource { margin-left: 3em; padding-left: 4px; } -div.sourceCode - { } -@media screen { -pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } -} @@ -482,20 +447,7 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true});

On this page

@@ -508,496 +460,9 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true});

cli.utils

cli.utils

-

Utility methods for axolotl CLI.

-
-

Functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescription
add_options_from_configCreate Click options from the fields of a Pydantic model.
add_options_from_dataclassCreate Click options from the fields of a dataclass.
build_commandBuild command list from base command and options.
download_fileDownload a single file and return its processing status.
fetch_from_githubSync files from a specific directory in the GitHub repository.
filter_none_kwargsWraps function to remove None-valued kwargs.
load_model_and_tokenizerHelper function for loading a model, tokenizer, and processor specified in the given axolotl
strip_optional_typeExtracts the non-None type from an Optional / Union type.
-
-

add_options_from_config

-
cli.utils.add_options_from_config(config_class)
-

Create Click options from the fields of a Pydantic model.

-
-

Parameters

- ------ - - - - - - - - - - - - - - - - -
NameTypeDescriptionDefault
config_classType[BaseModel]PyDantic model with fields to parse from the CLIrequired
-
-
-

Returns

- - - - - - - - - - - - - - - -
NameTypeDescription
CallableFunction decorator for Axolotl CLI command.
-
-
-
-

add_options_from_dataclass

-
cli.utils.add_options_from_dataclass(config_class)
-

Create Click options from the fields of a dataclass.

-
-

Parameters

- ------ - - - - - - - - - - - - - - - - -
NameTypeDescriptionDefault
config_classType[Any]Dataclass with fields to parse from the CLI.required
-
-
-

Returns

- - - - - - - - - - - - - - - -
NameTypeDescription
CallableFunction decorator for Axolotl CLI command.
-
-
-
-

build_command

-
cli.utils.build_command(base_cmd, options)
-

Build command list from base command and options.

-
-

Parameters

- ------ - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionDefault
base_cmdlist[str]Command without options.required
optionsdict[str, Any]Options to parse and append to base command.required
-
-
-

Returns

- - - - - - - - - - - - - - - -
NameTypeDescription
list[str]List of strings giving shell command.
-
-
-
-

download_file

-
cli.utils.download_file(file_info, raw_base_url, dest_path, dir_prefix)
-

Download a single file and return its processing status.

-
-

Parameters

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionDefault
file_infotupleTuple of (file_path, remote_sha).required
raw_base_urlstrBase URL for raw GitHub content.required
dest_pathPathLocal destination directory.required
dir_prefixstrDirectory prefix to filter files.required
-
-
-

Returns

- ----- - - - - - - - - - - - - - - -
NameTypeDescription
tuple[str, str]Tuple of (file_path, status) where status is ‘new’, ‘updated’, or ‘unchanged’.
-
-
-
-

fetch_from_github

-
cli.utils.fetch_from_github(dir_prefix, dest_dir=None, max_workers=5)
-

Sync files from a specific directory in the GitHub repository. -Only downloads files that don’t exist locally or have changed.

-
-

Parameters

- ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionDefault
dir_prefixstrDirectory prefix to filter files (e.g., ‘examples/’, ‘deepspeed_configs/’).required
dest_dirstr | NoneLocal destination directory.None
max_workersintMaximum number of concurrent downloads.5
-
-
-
-

filter_none_kwargs

-
cli.utils.filter_none_kwargs(func)
-

Wraps function to remove None-valued kwargs.

-
-

Parameters

- - - - - - - - - - - - - - - - - -
NameTypeDescriptionDefault
funcCallableFunction to wrap.required
-
-
-

Returns

- - - - - - - - - - - - - - - -
NameTypeDescription
CallableWrapped function.
-
-
-
-

load_model_and_tokenizer

-
cli.utils.load_model_and_tokenizer(cfg, inference=False)
-

Helper function for loading a model, tokenizer, and processor specified in the given axolotl -config.

-
-

Parameters

- ------ - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionDefault
cfgDictDefaultDictionary mapping axolotl config keys to values.required
inferenceboolBoolean denoting inference mode.False
-
-
-

Returns

- ----- - - - - - - - - - - - - - - -
NameTypeDescription
tuple[PreTrainedModel, PreTrainedTokenizer | PreTrainedTokenizerFast | Any, ProcessorMixin | None]Tuple of (PreTrainedModel, PreTrainedTokenizer, ProcessorMixin).
-
-
-
-

strip_optional_type

-
cli.utils.strip_optional_type(field_type)
-

Extracts the non-None type from an Optional / Union type.

-
-

Parameters

- ------ - - - - - - - - - - - - - - - - -
NameTypeDescriptionDefault
field_typetype | str | NoneType of field for Axolotl CLI command.required
-
-
-

Returns

- ----- - - - - - - - - - - - - - - -
NameTypeDescription
If the input type is Union[T, None] or Optional[T], returns T. Otherwise returns the input type unchanged.
+

Init for axolotl.cli.utils module.

-
-
-
diff --git a/docs/api/cli.utils.load.html b/docs/api/cli.utils.load.html new file mode 100644 index 000000000..73dd14e14 --- /dev/null +++ b/docs/api/cli.utils.load.html @@ -0,0 +1,994 @@ + + + + + + + + + +cli.utils.load – Axolotl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +
+ + + +
+ + + + +
+

cli.utils.load

+

cli.utils.load

+

Utilities for model, tokenizer, etc. loading.

+
+

Functions

+ + + + + + + + + + + + + +
NameDescription
load_model_and_tokenizerHelper function for loading a model, tokenizer, and processor specified in the
+
+

load_model_and_tokenizer

+
cli.utils.load.load_model_and_tokenizer(cfg, inference=False)
+

Helper function for loading a model, tokenizer, and processor specified in the +given axolotl config.

+
+

Parameters

+ ++++++ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
cfgDictDefaultDictionary mapping axolotl config keys to values.required
inferenceboolBoolean denoting inference mode.False
+
+
+

Returns

+ +++++ + + + + + + + + + + + + + + +
NameTypeDescription
tuple[PreTrainedModel, PreTrainedTokenizer | PreTrainedTokenizerFast | Any, ProcessorMixin | None]Tuple of (PreTrainedModel, PreTrainedTokenizer, ProcessorMixin).
+ + +
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/api/cli.sweeps.html b/docs/api/cli.utils.sweeps.html similarity index 97% rename from docs/api/cli.sweeps.html rename to docs/api/cli.utils.sweeps.html index 8f3598e20..664022c0a 100644 --- a/docs/api/cli.sweeps.html +++ b/docs/api/cli.utils.sweeps.html @@ -7,7 +7,7 @@ -cli.sweeps – Axolotl +cli.utils.sweeps – Axolotl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +
+ + + +
+ + + + +
+

cli.utils.train

+

cli.utils.train

+

Utilities for axolotl train CLI command.

+
+

Functions

+ + + + + + + + + + + + + + + + + + + + + +
NameDescription
build_commandBuild command list from base command and options.
generate_config_filesGenerate list of configuration files to process.
launch_trainingExecute training with the given configuration.
+
+

build_command

+
cli.utils.train.build_command(base_cmd, options)
+

Build command list from base command and options.

+
+

Parameters

+ ++++++ + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionDefault
base_cmdlist[str]Command without options.required
optionsdict[str, Any]Options to parse and append to base command.required
+
+
+

Returns

+ + + + + + + + + + + + + + + +
NameTypeDescription
list[str]List of strings giving shell command.
+
+
+
+

generate_config_files

+
cli.utils.train.generate_config_files(config, sweep)
+

Generate list of configuration files to process.

+
+
+

launch_training

+
cli.utils.train.launch_training(
+    cfg_file,
+    launcher,
+    cloud,
+    kwargs,
+    launcher_args=None,
+)
+

Execute training with the given configuration.

+ + +
+
+
+ +
+ +
+ + + + + \ No newline at end of file diff --git a/docs/api/index.html b/docs/api/index.html index 472b1ed6a..7fa3d3230 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -571,13 +571,21 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true}); Module for axolotl CLI command arguments. +cli.art +Axolotl ASCII logo utils. + + cli.checks Various checks for Axolotl CLI. - + cli.config Configuration loading and processing. + +cli.delinearize_llama4 +CLI tool to delinearize quantized/Linearized Llama-4 models. + cli.inference CLI to run inference on a trained model. @@ -595,28 +603,44 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true}); CLI to run preprocessing of a dataset. -cli.sweeps -Utilities for handling sweeps over configs for axolotl train CLI command +cli.quantize +CLI to post-training quantize a model using torchao -cli.utils -Utility methods for axolotl CLI. - - cli.vllm_serve CLI to start the vllm server for online RL - + cli.cloud.base base class for cloud platforms from cli - + cli.cloud.modal_ Modal Cloud support from CLI + +cli.utils +Init for axolotl.cli.utils module. + -cli.quantize -CLI to post-training quantize a model using torchao +cli.utils.args +Utilities for axolotl CLI args. + + +cli.utils.fetch +Utilities for axolotl fetch CLI command. + + +cli.utils.load +Utilities for model, tokenizer, etc. loading. + + +cli.utils.sweeps +Utilities for handling sweeps over configs for axolotl train CLI command + + +cli.utils.train +Utilities for axolotl train CLI command. diff --git a/docs/cli.html b/docs/cli.html index e5ae8669b..ed80838f8 100644 --- a/docs/cli.html +++ b/docs/cli.html @@ -482,7 +482,10 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true});

On this page