Built site for gh-pages
This commit is contained in:
@@ -441,7 +441,13 @@ gtag('config', 'G-9KYCVJBNMQ', { 'anonymize_ip': true});
|
||||
<li class="sidebar-item">
|
||||
<div class="sidebar-item-container">
|
||||
<a href="../../docs/nd_parallelism.html" class="sidebar-item-text sidebar-link">
|
||||
<span class="menu-text">N-D Parallelism</span></a>
|
||||
<span class="menu-text">N-D Parallelism (Beta)</span></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="sidebar-item">
|
||||
<div class="sidebar-item-container">
|
||||
<a href="../../docs/optimizers.html" class="sidebar-item-text sidebar-link">
|
||||
<span class="menu-text">Optimizers</span></a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -542,10 +548,35 @@ Plugins can be used to integrate third-party models, modify the training process
|
||||
<h3 class="anchored" data-anchor-id="axolotl.integrations.base.BaseOptimizerFactory">BaseOptimizerFactory</h3>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BaseOptimizerFactory()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Base class for factories to create custom optimizers</p>
|
||||
<section id="methods" class="level4">
|
||||
<h4 class="anchored" data-anchor-id="methods">Methods</h4>
|
||||
<table class="caption-top table">
|
||||
<thead>
|
||||
<tr class="header">
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td><a href="#axolotl.integrations.base.BaseOptimizerFactory.get_decay_parameter_names">get_decay_parameter_names</a></td>
|
||||
<td>Get all parameter names that weight decay will be applied to.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<section id="axolotl.integrations.base.BaseOptimizerFactory.get_decay_parameter_names" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BaseOptimizerFactory.get_decay_parameter_names">get_decay_parameter_names</h5>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BaseOptimizerFactory.get_decay_parameter_names(model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Get all parameter names that weight decay will be applied to.</p>
|
||||
<p>This function filters out parameters in two ways:
|
||||
1. By layer type (instances of layers specified in ALL_LAYERNORM_LAYERS)
|
||||
2. By parameter name patterns (containing ‘bias’, or variation of ‘norm’)</p>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin" class="level3">
|
||||
<h3 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin">BasePlugin</h3>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Base class for all plugins. Defines the interface for plugin methods.</p>
|
||||
<p>A plugin is a reusable, modular, and self-contained piece of code that extends
|
||||
the functionality of Axolotl. Plugins can be used to integrate third-party models,
|
||||
@@ -574,8 +605,8 @@ training.
|
||||
- add_callbacks_post_trainer(cfg, trainer): Adds callbacks to the trainer after
|
||||
training.</p>
|
||||
</section>
|
||||
<section id="methods" class="level4">
|
||||
<h4 class="anchored" data-anchor-id="methods">Methods</h4>
|
||||
<section id="methods-1" class="level4">
|
||||
<h4 class="anchored" data-anchor-id="methods-1">Methods</h4>
|
||||
<table class="caption-top table">
|
||||
<thead>
|
||||
<tr class="header">
|
||||
@@ -664,7 +695,7 @@ training.</p>
|
||||
</table>
|
||||
<section id="axolotl.integrations.base.BasePlugin.add_callbacks_post_trainer" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.add_callbacks_post_trainer">add_callbacks_post_trainer</h5>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.add_callbacks_post_trainer(cfg, trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.add_callbacks_post_trainer(cfg, trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Adds callbacks to the trainer after creating the trainer. This is useful for
|
||||
callbacks that require access to the model or trainer.</p>
|
||||
<section id="parameters" class="level6 doc-section doc-section-parameters">
|
||||
@@ -722,7 +753,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.add_callbacks_pre_trainer" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.add_callbacks_pre_trainer">add_callbacks_pre_trainer</h5>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.add_callbacks_pre_trainer(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.add_callbacks_pre_trainer(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Set up callbacks before creating the trainer.</p>
|
||||
<section id="parameters-1" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-1">Parameters</h6>
|
||||
@@ -784,12 +815,12 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.create_lr_scheduler" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.create_lr_scheduler">create_lr_scheduler</h5>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.create_lr_scheduler(</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> cfg,</span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> trainer,</span>
|
||||
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a> optimizer,</span>
|
||||
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a> num_training_steps,</span>
|
||||
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.create_lr_scheduler(</span>
|
||||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> cfg,</span>
|
||||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> trainer,</span>
|
||||
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> optimizer,</span>
|
||||
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> num_training_steps,</span>
|
||||
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Creates and returns a learning rate scheduler.</p>
|
||||
<section id="parameters-2" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-2">Parameters</h6>
|
||||
@@ -858,7 +889,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.create_optimizer" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.create_optimizer">create_optimizer</h5>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.create_optimizer(cfg, trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.create_optimizer(cfg, trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Creates and returns an optimizer for training.</p>
|
||||
<section id="parameters-3" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-3">Parameters</h6>
|
||||
@@ -915,7 +946,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.get_collator_cls_and_kwargs" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.get_collator_cls_and_kwargs">get_collator_cls_and_kwargs</h5>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.get_collator_cls_and_kwargs(cfg, is_eval<span class="op">=</span><span class="va">False</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.get_collator_cls_and_kwargs(cfg, is_eval<span class="op">=</span><span class="va">False</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Returns a custom class for the collator.</p>
|
||||
<section id="parameters-4" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-4">Parameters</h6>
|
||||
@@ -972,12 +1003,12 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.get_input_args" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.get_input_args">get_input_args</h5>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.get_input_args()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.get_input_args()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Returns a pydantic model for the plugin’s input arguments.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.get_trainer_cls" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.get_trainer_cls">get_trainer_cls</h5>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.get_trainer_cls(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.get_trainer_cls(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Returns a custom class for the trainer.</p>
|
||||
<section id="parameters-5" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-5">Parameters</h6>
|
||||
@@ -1033,7 +1064,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.get_training_args" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.get_training_args">get_training_args</h5>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.get_training_args(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.get_training_args(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Returns custom training arguments to set on TrainingArgs.</p>
|
||||
<section id="parameters-6" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-6">Parameters</h6>
|
||||
@@ -1084,12 +1115,12 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.get_training_args_mixin" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.get_training_args_mixin">get_training_args_mixin</h5>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.get_training_args_mixin()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.get_training_args_mixin()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Returns a dataclass model for the plugin’s training arguments.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.load_datasets" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.load_datasets">load_datasets</h5>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.load_datasets(cfg, preprocess<span class="op">=</span><span class="va">False</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.load_datasets(cfg, preprocess<span class="op">=</span><span class="va">False</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Loads and preprocesses the dataset for training.</p>
|
||||
<section id="parameters-7" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-7">Parameters</h6>
|
||||
@@ -1151,7 +1182,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.post_lora_load" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.post_lora_load">post_lora_load</h5>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_lora_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_lora_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Performs actions after LoRA weights are loaded.</p>
|
||||
<section id="parameters-8" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-8">Parameters</h6>
|
||||
@@ -1189,7 +1220,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.post_model_build" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.post_model_build">post_model_build</h5>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_model_build(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb15"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_model_build(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Performs actions after the model is built/loaded, but before any adapters are applied.</p>
|
||||
<section id="parameters-9" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-9">Parameters</h6>
|
||||
@@ -1221,7 +1252,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.post_model_load" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.post_model_load">post_model_load</h5>
|
||||
<div class="sourceCode" id="cb15"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_model_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb16"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_model_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Performs actions after the model is loaded.</p>
|
||||
<section id="parameters-10" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-10">Parameters</h6>
|
||||
@@ -1259,7 +1290,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.post_train" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.post_train">post_train</h5>
|
||||
<div class="sourceCode" id="cb16"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_train(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb17"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_train(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Performs actions after training is complete.</p>
|
||||
<section id="parameters-11" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-11">Parameters</h6>
|
||||
@@ -1297,7 +1328,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.post_train_unload" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.post_train_unload">post_train_unload</h5>
|
||||
<div class="sourceCode" id="cb17"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_train_unload(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb18"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_train_unload(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Performs actions after training is complete and the model is unloaded.</p>
|
||||
<section id="parameters-12" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-12">Parameters</h6>
|
||||
@@ -1329,7 +1360,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.post_trainer_create" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.post_trainer_create">post_trainer_create</h5>
|
||||
<div class="sourceCode" id="cb18"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_trainer_create(cfg, trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb19"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.post_trainer_create(cfg, trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Performs actions after the trainer is created.</p>
|
||||
<section id="parameters-13" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-13">Parameters</h6>
|
||||
@@ -1367,7 +1398,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.pre_lora_load" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.pre_lora_load">pre_lora_load</h5>
|
||||
<div class="sourceCode" id="cb19"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.pre_lora_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb20"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.pre_lora_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Performs actions before LoRA weights are loaded.</p>
|
||||
<section id="parameters-14" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-14">Parameters</h6>
|
||||
@@ -1405,7 +1436,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.pre_model_load" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.pre_model_load">pre_model_load</h5>
|
||||
<div class="sourceCode" id="cb20"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.pre_model_load(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb21"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.pre_model_load(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Performs actions before the model is loaded.</p>
|
||||
<section id="parameters-15" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-15">Parameters</h6>
|
||||
@@ -1437,7 +1468,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.BasePlugin.register" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.BasePlugin.register">register</h5>
|
||||
<div class="sourceCode" id="cb21"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.register(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb22"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a>integrations.base.BasePlugin.register(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Registers the plugin with the given configuration.</p>
|
||||
<section id="parameters-16" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-16">Parameters</h6>
|
||||
@@ -1471,7 +1502,7 @@ callbacks that require access to the model or trainer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager" class="level3">
|
||||
<h3 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager">PluginManager</h3>
|
||||
<div class="sourceCode" id="cb22"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb23"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>The <code>PluginManager</code> class is responsible for loading and managing plugins. It
|
||||
should be a singleton so it can be accessed from anywhere in the codebase.</p>
|
||||
<section id="attributes" class="level4 doc-section doc-section-attributes">
|
||||
@@ -1500,8 +1531,8 @@ should be a singleton so it can be accessed from anywhere in the codebase.</p>
|
||||
- register(plugin_name: str): Registers a new plugin by its name.
|
||||
- pre_model_load(cfg): Calls the pre_model_load method of all registered plugins.</p>
|
||||
</section>
|
||||
<section id="methods-1" class="level4">
|
||||
<h4 class="anchored" data-anchor-id="methods-1">Methods</h4>
|
||||
<section id="methods-2" class="level4">
|
||||
<h4 class="anchored" data-anchor-id="methods-2">Methods</h4>
|
||||
<table class="caption-top table">
|
||||
<thead>
|
||||
<tr class="header">
|
||||
@@ -1594,7 +1625,7 @@ should be a singleton so it can be accessed from anywhere in the codebase.</p>
|
||||
</table>
|
||||
<section id="axolotl.integrations.base.PluginManager.add_callbacks_post_trainer" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.add_callbacks_post_trainer">add_callbacks_post_trainer</h5>
|
||||
<div class="sourceCode" id="cb23"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.add_callbacks_post_trainer(cfg, trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb24"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.add_callbacks_post_trainer(cfg, trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the <code>add_callbacks_post_trainer</code> method of all registered plugins.</p>
|
||||
<section id="parameters-17" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-17">Parameters</h6>
|
||||
@@ -1656,7 +1687,7 @@ should be a singleton so it can be accessed from anywhere in the codebase.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.add_callbacks_pre_trainer" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.add_callbacks_pre_trainer">add_callbacks_pre_trainer</h5>
|
||||
<div class="sourceCode" id="cb24"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.add_callbacks_pre_trainer(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb25"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.add_callbacks_pre_trainer(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the add_callbacks_pre_trainer method of all registered plugins.</p>
|
||||
<section id="parameters-18" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-18">Parameters</h6>
|
||||
@@ -1718,11 +1749,11 @@ should be a singleton so it can be accessed from anywhere in the codebase.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.create_lr_scheduler" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.create_lr_scheduler">create_lr_scheduler</h5>
|
||||
<div class="sourceCode" id="cb25"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.create_lr_scheduler(</span>
|
||||
<span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a> trainer,</span>
|
||||
<span id="cb25-3"><a href="#cb25-3" aria-hidden="true" tabindex="-1"></a> optimizer,</span>
|
||||
<span id="cb25-4"><a href="#cb25-4" aria-hidden="true" tabindex="-1"></a> num_training_steps,</span>
|
||||
<span id="cb25-5"><a href="#cb25-5" aria-hidden="true" tabindex="-1"></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb26"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.create_lr_scheduler(</span>
|
||||
<span id="cb26-2"><a href="#cb26-2" aria-hidden="true" tabindex="-1"></a> trainer,</span>
|
||||
<span id="cb26-3"><a href="#cb26-3" aria-hidden="true" tabindex="-1"></a> optimizer,</span>
|
||||
<span id="cb26-4"><a href="#cb26-4" aria-hidden="true" tabindex="-1"></a> num_training_steps,</span>
|
||||
<span id="cb26-5"><a href="#cb26-5" aria-hidden="true" tabindex="-1"></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the <code>create_lr_scheduler</code> method of all registered plugins and returns
|
||||
the first non-<code>None</code> scheduler.</p>
|
||||
<section id="parameters-19" class="level6 doc-section doc-section-parameters">
|
||||
@@ -1785,7 +1816,7 @@ the first non-<code>None</code> scheduler.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.create_optimizer" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.create_optimizer">create_optimizer</h5>
|
||||
<div class="sourceCode" id="cb26"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.create_optimizer(trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb27"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.create_optimizer(trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the <code>create_optimizer</code> method of all registered plugins and returns
|
||||
the first non-<code>None</code> optimizer.</p>
|
||||
<section id="parameters-20" class="level6 doc-section doc-section-parameters">
|
||||
@@ -1836,7 +1867,7 @@ the first non-<code>None</code> optimizer.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.get_collator_cls_and_kwargs" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.get_collator_cls_and_kwargs">get_collator_cls_and_kwargs</h5>
|
||||
<div class="sourceCode" id="cb27"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_collator_cls_and_kwargs(cfg, is_eval<span class="op">=</span><span class="va">False</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb28"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_collator_cls_and_kwargs(cfg, is_eval<span class="op">=</span><span class="va">False</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the get_collator_cls_and_kwargs method of all registered plugins and returns the first non-None collator class.</p>
|
||||
<p>Parameters:
|
||||
cfg (dict): The configuration for the plugins.
|
||||
@@ -1846,7 +1877,7 @@ object: The collator class, or None if none was found.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.get_input_args" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.get_input_args">get_input_args</h5>
|
||||
<div class="sourceCode" id="cb28"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_input_args()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb29"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_input_args()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Returns a list of Pydantic classes for all registered plugins’ input arguments.’</p>
|
||||
<section id="returns-12" class="level6 doc-section doc-section-returns">
|
||||
<h6 class="doc-section doc-section-returns anchored" data-anchor-id="returns-12">Returns</h6>
|
||||
@@ -1875,13 +1906,13 @@ object: The collator class, or None if none was found.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.get_instance" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.get_instance">get_instance</h5>
|
||||
<div class="sourceCode" id="cb29"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_instance()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb30"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_instance()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Returns the singleton instance of PluginManager. If the instance doesn’t
|
||||
exist, it creates a new one.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.get_trainer_cls" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.get_trainer_cls">get_trainer_cls</h5>
|
||||
<div class="sourceCode" id="cb30"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_trainer_cls(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb31"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_trainer_cls(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the <code>get_trainer_cls</code> method of all registered plugins and returns the
|
||||
first non-<code>None</code> trainer class.</p>
|
||||
<section id="parameters-21" class="level6 doc-section doc-section-parameters">
|
||||
@@ -1938,7 +1969,7 @@ first non-<code>None</code> trainer class.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.get_training_args" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.get_training_args">get_training_args</h5>
|
||||
<div class="sourceCode" id="cb31"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_training_args(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb32"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_training_args(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the get_training_args method of all registered plugins and returns the combined training arguments.</p>
|
||||
<p>Parameters:
|
||||
cfg (dict): The configuration for the plugins.</p>
|
||||
@@ -1947,14 +1978,14 @@ object: The training arguments</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.get_training_args_mixin" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.get_training_args_mixin">get_training_args_mixin</h5>
|
||||
<div class="sourceCode" id="cb32"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_training_args_mixin()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb33"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.get_training_args_mixin()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Returns a list of dataclasses for all registered plugins’ training args mixins’</p>
|
||||
<p>Returns:
|
||||
list[str]: A list of dataclsses</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.load_datasets" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.load_datasets">load_datasets</h5>
|
||||
<div class="sourceCode" id="cb33"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.load_datasets(cfg, preprocess<span class="op">=</span><span class="va">False</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb34"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.load_datasets(cfg, preprocess<span class="op">=</span><span class="va">False</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the load_datasets method of each registered plugin.</p>
|
||||
<section id="parameters-22" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-22">Parameters</h6>
|
||||
@@ -2016,7 +2047,7 @@ list[str]: A list of dataclsses</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.post_lora_load" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.post_lora_load">post_lora_load</h5>
|
||||
<div class="sourceCode" id="cb34"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_lora_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb35"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_lora_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the <code>post_lora_load</code> method of all registered plugins.</p>
|
||||
<section id="parameters-23" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-23">Parameters</h6>
|
||||
@@ -2054,7 +2085,7 @@ list[str]: A list of dataclsses</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.post_model_build" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.post_model_build">post_model_build</h5>
|
||||
<div class="sourceCode" id="cb35"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_model_build(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb36"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_model_build(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the <code>post_model_build</code> method of all registered plugins after the
|
||||
model has been built / loaded, but before any adapters have been applied.</p>
|
||||
<section id="parameters-24" class="level6 doc-section doc-section-parameters">
|
||||
@@ -2093,7 +2124,7 @@ model has been built / loaded, but before any adapters have been applied.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.post_model_load" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.post_model_load">post_model_load</h5>
|
||||
<div class="sourceCode" id="cb36"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_model_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb37"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_model_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the <code>post_model_load</code> method of all registered plugins after the model
|
||||
has been loaded inclusive of any adapters.</p>
|
||||
<section id="parameters-25" class="level6 doc-section doc-section-parameters">
|
||||
@@ -2132,7 +2163,7 @@ has been loaded inclusive of any adapters.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.post_train" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.post_train">post_train</h5>
|
||||
<div class="sourceCode" id="cb37"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_train(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb38"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_train(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the post_train method of all registered plugins.</p>
|
||||
<section id="parameters-26" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-26">Parameters</h6>
|
||||
@@ -2170,7 +2201,7 @@ has been loaded inclusive of any adapters.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.post_train_unload" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.post_train_unload">post_train_unload</h5>
|
||||
<div class="sourceCode" id="cb38"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_train_unload(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb39"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_train_unload(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the post_train_unload method of all registered plugins.</p>
|
||||
<section id="parameters-27" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-27">Parameters</h6>
|
||||
@@ -2202,7 +2233,7 @@ has been loaded inclusive of any adapters.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.post_trainer_create" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.post_trainer_create">post_trainer_create</h5>
|
||||
<div class="sourceCode" id="cb39"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_trainer_create(cfg, trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb40"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.post_trainer_create(cfg, trainer)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the <code>post_trainer_create</code> method of all registered plugins.</p>
|
||||
<section id="parameters-28" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-28">Parameters</h6>
|
||||
@@ -2240,7 +2271,7 @@ has been loaded inclusive of any adapters.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.pre_lora_load" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.pre_lora_load">pre_lora_load</h5>
|
||||
<div class="sourceCode" id="cb40"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.pre_lora_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb41"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.pre_lora_load(cfg, model)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the <code>pre_lora_load</code> method of all registered plugins.</p>
|
||||
<section id="parameters-29" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-29">Parameters</h6>
|
||||
@@ -2278,7 +2309,7 @@ has been loaded inclusive of any adapters.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.pre_model_load" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.pre_model_load">pre_model_load</h5>
|
||||
<div class="sourceCode" id="cb41"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.pre_model_load(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb42"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.pre_model_load(cfg)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Calls the pre_model_load method of all registered plugins.</p>
|
||||
<section id="parameters-30" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-30">Parameters</h6>
|
||||
@@ -2310,7 +2341,7 @@ has been loaded inclusive of any adapters.</p>
|
||||
</section>
|
||||
<section id="axolotl.integrations.base.PluginManager.register" class="level5">
|
||||
<h5 class="anchored" data-anchor-id="axolotl.integrations.base.PluginManager.register">register</h5>
|
||||
<div class="sourceCode" id="cb42"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.register(plugin_name)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb43"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a>integrations.base.PluginManager.register(plugin_name)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Registers a new plugin by its name.</p>
|
||||
<section id="parameters-31" class="level6 doc-section doc-section-parameters">
|
||||
<h6 class="doc-section doc-section-parameters anchored" data-anchor-id="parameters-31">Parameters</h6>
|
||||
@@ -2380,7 +2411,7 @@ has been loaded inclusive of any adapters.</p>
|
||||
</table>
|
||||
<section id="axolotl.integrations.base.load_plugin" class="level3">
|
||||
<h3 class="anchored" data-anchor-id="axolotl.integrations.base.load_plugin">load_plugin</h3>
|
||||
<div class="sourceCode" id="cb43"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a>integrations.base.load_plugin(plugin_name)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<div class="sourceCode" id="cb44"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true" tabindex="-1"></a>integrations.base.load_plugin(plugin_name)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||||
<p>Loads a plugin based on the given plugin name.</p>
|
||||
<p>The plugin name should be in the format “module_name.class_name”. This function
|
||||
splits the plugin name into module and class, imports the module, retrieves the
|
||||
|
||||
Reference in New Issue
Block a user