Image-Text-to-Text
Transformers
Safetensors
kimi_k31
text-generation
mixture-of-experts
expert-upcycling
scientific-ai
chip-design
space
physics
s-t-a-r
custom_code
8-bit precision
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 eval/h2c/C2_train_record.json from STAR-future/Trinity: direct link, hf CLI and curl.
- Browser
- Download file 1.95 kB
-
https://huggingface.co/STAR-future/Trinity/resolve/main/eval/h2c/C2_train_record.json
- Command line
-
hf download hf://STAR-future/Trinity/eval/h2c/C2_train_record.json
-
curl -L -o C2_train_record.json https://huggingface.co/STAR-future/Trinity/resolve/main/eval/h2c/C2_train_record.json
1.95 kB
| { | |
| "args": { | |
| "cmd": "train", | |
| "cache": "/content/k3p/out_train", | |
| "out": "/content/k3p/h2c/C2", | |
| "trained": "", | |
| "k": 64, | |
| "lr": 3e-05, | |
| "epochs": 2.0, | |
| "bs": 2048, | |
| "kl": 1.0, | |
| "val_frac": 0.1, | |
| "seed": 20261119, | |
| "opt": "adafactor" | |
| }, | |
| "unfrozen_experts": [ | |
| 565, | |
| 840, | |
| 879, | |
| 39, | |
| 472, | |
| 631, | |
| 621, | |
| 227, | |
| 590, | |
| 883, | |
| 479, | |
| 666, | |
| 410, | |
| 559, | |
| 882, | |
| 87, | |
| 814, | |
| 289, | |
| 1031, | |
| 763, | |
| 475, | |
| 454, | |
| 1033, | |
| 736, | |
| 671, | |
| 377, | |
| 792, | |
| 857, | |
| 177, | |
| 166, | |
| 90, | |
| 764, | |
| 162, | |
| 591, | |
| 610, | |
| 597, | |
| 382, | |
| 778, | |
| 961, | |
| 507, | |
| 411, | |
| 495, | |
| 549, | |
| 116, | |
| 118, | |
| 884, | |
| 221, | |
| 908, | |
| 921, | |
| 1141, | |
| 551, | |
| 11, | |
| 787, | |
| 816, | |
| 858, | |
| 831, | |
| 10, | |
| 488, | |
| 42, | |
| 158, | |
| 199, | |
| 465, | |
| 586, | |
| 135 | |
| ], | |
| "trained_parameters": 2113929216, | |
| "val_before": 1.8403315544128418, | |
| "identity_check": 1.8406234979629517, | |
| "val_after": 1.8390562534332275, | |
| "val_gen_before": 0.1100296825170517, | |
| "val_gen_after": 0.11002981662750244, | |
| "rel_dom": -0.0006929734897802928, | |
| "rel_gen": 1.218857018185482e-06, | |
| "delta_W_abs_sum": 11939.037715911865, | |
| "steps": 133, | |
| "log": [ | |
| { | |
| "step": 0, | |
| "loss_domain": 1.821340799331665, | |
| "loss_kl": 1.6254573438345687e-06 | |
| }, | |
| { | |
| "step": 20, | |
| "loss_domain": 1.8621320724487305, | |
| "loss_kl": 1.2786986189894378e-06 | |
| }, | |
| { | |
| "step": 40, | |
| "loss_domain": 1.851332187652588, | |
| "loss_kl": 1.8230447267342242e-06 | |
| }, | |
| { | |
| "step": 60, | |
| "loss_domain": 1.8482069969177246, | |
| "loss_kl": 4.9720401875674725e-06 | |
| }, | |
| { | |
| "step": 80, | |
| "loss_domain": 1.8202400207519531, | |
| "loss_kl": 4.500740033108741e-06 | |
| }, | |
| { | |
| "step": 100, | |
| "loss_domain": 1.7226955890655518, | |
| "loss_kl": 3.897718215739587e-06 | |
| }, | |
| { | |
| "step": 120, | |
| "loss_domain": 1.768824815750122, | |
| "loss_kl": 3.5498032957548276e-06 | |
| }, | |
| { | |
| "step": 132, | |
| "loss_domain": 1.8629543781280518, | |
| "loss_kl": 5.247568424238125e-07 | |
| } | |
| ], | |
| "domain_routing_share": 0.3268721401691437, | |
| "peak_gpu_gib": 26.60610580444336 | |
| } |