(window.webpackJsonp=window.webpackJsonp||[]).push([[213],{1286:function(n,e){n.exports={attributes:{title:"OpenAI",description:"The ArgillaOpenAITrainer leverages the features of OpenAI to fine-tune programmatically with Argilla.",links:[{linkText:"Argilla docs",linkLink:"https://docs.argilla.io/en/latest/guides/train_a_model.html"},{linkText:"OpenAI docs",linkLink:"https://platform.openai.com/docs/guides/fine-tuning"}]},html:'<p><em>code snippet</em></p>\n<pre><code class="language-python">from argilla.training import ArgillaTrainer\n\ntrainer = ArgillaTrainer(\n    name=&quot;&lt;my_dataset_name&gt;&quot;,\n    workspace=&quot;&lt;my_workspace_name&gt;&quot;,\n    framework=&quot;setfit&quot;,\n    train_size=0.8\n)\ntrainer.update_config(num_iterations=10)\ntrainer.train(output_dir=&quot;token-classification&quot;)\nrecords = trainer.predict(&quot;The ArgillaTrainer is great!&quot;, as_argilla_records=True)\n</code></pre>\n<p><em>update training config</em></p>\n<pre><code class="language-python">trainer.update_config(\n    training_file = None,\n    validation_file = None,\n    model = &quot;curie,\n    n_epochs = 2,\n    batch_size = None,\n    learning_rate_multiplier = 0.1,\n    prompt_loss_weight = 0.1,\n    compute_classification_metrics = False,\n    classification_n_classes = None,\n    classification_positive_class = None,\n    classification_betas = None,\n    suffix = None\n)\n</code></pre>\n'}}}]);