Commands and code stay in English in every language. Replace uppercase placeholders with values from your own account and paid job; do not paste real keys into shared notebooks or logs.
An actual optimization step
- Batch Tokenize approved examples
- Prediction Run the student forward pass
- Loss Measure the training error
- Optimization Compute gradients and update parameters
- Checkpoint Save the resulting model or adapters
Batch: Tokenize approved examples. Prediction: Run the student forward pass. Loss: Measure the training error. Optimization: Compute gradients and update parameters. Checkpoint: Save the resulting model or adapters
Choose a supported training method
SFT performs supervised fine-tuning. LoRA trains low-rank adapter parameters. QLoRA combines adapter training with a compatible quantized base. The Transformers causal-language-model adapter checks the selected model, method and runtime; it does not support every architecture or device. Gradient-based optimization changes student weights.
- Review learning rate, sequence length, batch size and accumulation before training.
- Methods are SFT, LoRA and QLoRA; Automatic mode can select auto.
- An adapter package requires its matching pinned base model and tokenizer.
Project methods: SFT | LoRA | QLoRA (Automatic mode may resolve auto).
Evaluation metrics: exact_match | macro_f1 | text_similarity | chrf.
Custom scorers require register_evaluator(name, scorer, version=...).
Model, tokenizer, device memory, precision and export must be compatible.
Teacher requests and local run time/storage are bounded by project budgets.
Validation and final-test JSONL are evaluated locally and are not shared.
Read the reviewed plan and compatibility result before starting a run.
Run an owned project
TrainingProject validates the project, obtains paid teacher authorization when required, prepares local data, measures a baseline, performs actual optimization, evaluates held-out criteria and records reports and manifests. Local training occurs on the configured runtime. A successful result depends on measured criteria and configured stop conditions.
- Do not submit fabricated metrics or completion reports.
- Keep the process, local storage and teacher API connection available as needed.
- If reporting or cleanup fails, preserve local output and inspect run state before retrying.
# Continue with project from TrainingProject.from_file(...).
result = project.run()
print(result["status"], result["stop_reason"], result["unmet_criteria"])
# TrainingProject performs real local optimization and records its run report.
import os
from fusionpointai_training import TrainingClient
client = TrainingClient(api_key=os.environ["FUSIONPOINTAI_API_KEY"])
session = client.get_session(os.environ["FUSIONPOINTAI_SESSION_ID"])
report = session.get("report")
last_event = report.get("last_event", {}) if isinstance(report, dict) else {}
print("State:", session["status"], "Step:", session["step"])
print("Last reported error code:", last_event.get("error_code"))
# A missing error_code does not prove success. Read state and your local report.
# Do not dump full provider responses, private data or authorization headers.
Automatic and Advanced modes
Automatic mode resolves compatible training settings from the project and runtime. Advanced mode accepts explicit supported settings for the same Transformers training backend. Both modes perform local optimization, record provenance and obey finite time, teacher-request and storage budgets. Hardware and model compatibility remain binding.
- Configuration modes are automatic and advanced; method values are SFT, LoRA or QLoRA, with auto resolved in Automatic mode.
- Topic progression depends on measured rubric results and configured stop conditions.
- No mode guarantees a particular benchmark or inference capability.