Skip to main content
This quickstart trains a decoder LLM when your application must control sampling, rewards, and model updates. To fine-tune a GLiNER encoder with a managed config job, use the Encoder Quickstart.

1. Authenticate

  1. Create a Fastino account.
  2. Open API keys.
  3. Create a key and copy it when shown.
Store the key in an environment variable:
Send this key as X-API-Key: $FASTINO_API_KEY. See Authentication for the complete authentication contract. Choose one supported interface:
  • Native JSON clients call POST /v1/training/jobs/create-model, queue model operations under /v1/training/jobs/{job_id}, and poll each returned future_id until completed, failed, or cancelled.
  • Existing Tinker programs keep tinker==0.32.0; follow Migrate from Tinker for SDK setup.
Native clients send no seq_id and no heartbeat. The server assigns operation ordering and keeps the internal session alive. A request with wait=true waits for at most 25 seconds, so a client must continue polling a nonterminal future. Follow Build a custom training loop for rewards, repeated rollouts, and recovery after this quickstart.

2. Install the client libraries

You need Python 3.11 or later. transformers provides the model’s tokenizer; the training itself runs on Fastino.

3. Choose a model

LoRA ranks from 1 through 32 are supported; the default is 32.

4. Create the job

The response has a job_id and the future_id of the job’s create future:
Every call that does work returns a future. Read it until status is completed. With wait=true, the request waits up to 25 seconds:

5. Train, save, and sample

The script below runs the whole loop: create a job, run three forward-backward passes and optimizer steps, save a sampler checkpoint, sample from it, and stop the job. Create quickstart.py:
The script waits for forward-backward to complete successfully before it submits the optimizer step. If either future fails or is cancelled, wait raises and the dependent operation is not submitted. enable_thinking=False closes the model’s reasoning block before the supervised answer begins. It is a tokenizer template argument, not a Training API request field. Run the script:
Copy the value printed after TRAINING_JOB_ID=.
An interactive job with no calls for 30 minutes is released. Its checkpoints are kept. Stopping returns immediately and prevents new calls, but already queued operations may finish before resources are released. Usage may continue until that release. You can still sample and download its sampler checkpoints.

6. Verify the canonical job

The response describes the same job created through the native REST endpoint. Continue with the public interactive operation pages for model operations and use the canonical jobs API for documented job reads.

Continue

Encoder Quickstart

Fine-tune a GLiNER encoder with a managed config job.

Interactive jobs reference

Review every interactive-job request and response.

Training loop

Add rewards, updates, and recovery to a custom loop.