Instructions to use STAR-future/Trinity with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use STAR-future/Trinity with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="STAR-future/Trinity", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("STAR-future/Trinity", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use STAR-future/Trinity with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "STAR-future/Trinity" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "STAR-future/Trinity", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/STAR-future/Trinity
- SGLang
How to use STAR-future/Trinity with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "STAR-future/Trinity" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "STAR-future/Trinity", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "STAR-future/Trinity" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "STAR-future/Trinity", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use STAR-future/Trinity with Docker Model Runner:
docker model run hf.co/STAR-future/Trinity
Download tools/PREREG_LB_B.md from STAR-future/Trinity: direct link, hf CLI and curl.
- Browser
- Download file 3.13 kB
-
https://huggingface.co/STAR-future/Trinity/resolve/main/tools/PREREG_LB_B.md
- Command line
-
hf download hf://STAR-future/Trinity/tools/PREREG_LB_B.md
-
curl -L -o PREREG_LB_B.md https://huggingface.co/STAR-future/Trinity/resolve/main/tools/PREREG_LB_B.md
Preregistration LB-B: LittleBoy's last layer specialised on domain text, measured against the base on the full model (2026-11-19)
Written before any training run. Code: k3pass.py (passes), lb_tail_train.py (training), lb_tail_eval.py
(verdict). Data:
- training:
16_EVIDENCE/NEXUS/DOMAIN_CORPUS_V1_2026-11-19/train_corpus_v1.jsonl, documents dated ≤ 2026-09-30; - domain holdout:
k3stream_holdout_pack.jsonl, documents dated 2026-10-01 to 2026-11-18; - general replay: Wikipedia articles 17–48 of the
wikimedia/wikipedia 20231101.enstream; - general holdout: articles 1–16 of the same stream.
What changes
In layer 92 only, its BF16 tensors receive LoRA updates, merged back into BF16 so the stock format is kept:
shared_experts.{gate,up,down}_proj;routed_expert_up_proj;routed_expert_norm.
Nothing else changes: the routed experts, the router, attention and every earlier layer stay as released.
Hyper-parameters
- Rank 64, alpha 64, learning rate 2e-4 (one-cycle schedule), 2 epochs, 2048 domain tokens per step.
- KL weight 1.0 on 1024 general-replay tokens per step.
- These are chosen on a validation split: 10 % of the training sequences. The holdout is read once, at the end.
- If the validation NLL does not improve, the run stops there and the holdout is not opened.
Amendment 1 (2026-11-19, before any training run)
Change: full rank instead of LoRA rank 64. The same five tensors are now trained at full rank, about 160M parameters, with fp32 master weights and AdamW at learning rate 2e-5. The new weights are written back in BF16. The low-rank variant remains in the code (--rank > 0) only for comparison.
Reason: a three-seed preregistered NEXUS experiment, 16_EVIDENCE/NEXUS/EXP_FACTOR_MZ_DEPTH_LAW_2026-11-19, found that low-rank adaptation kept only 30 % of the full-rank gain. Full rank fits easily: optimizer state is about 2 GB.
What does not change: the data, the selection on the validation split, the validity checks and the acceptance thresholds.
Validity
- Reference validity (gate LB-A). The base model's perplexity on the general holdout must be below 15. Otherwise the reference implementation is wrong and nothing is concluded.
- Cache consistency. LittleBoy-as-released NLL recomputed from the cache must equal the pass NLL within 1e-3 nats per sequence (
consistency_ok).
Acceptance (computed by lb_tail_eval.py)
- Domain: the tuned model's mean holdout NLL is at least 2 % below the base model's (Kimi K3.1-Pro) on ≥ 2 of the 3 domain sets (space, chips, physics).
- General: on the general holdout it is no more than 0.5 % above the base.
- Paired per-sequence relative differences with bootstrap 95 % intervals are reported for every set.
Consequence
- PASS: shard 93 is rebuilt with the five tensors replaced and uploaded. It is verified byte-for-byte outside those tensors. The model card states the measured numbers as measured on the full model, with this file as the protocol.
- FAIL: LittleBoy is released as built. The negative result is published in the evaluation section.