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
File size: 2,115 Bytes
f80e81a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | {
"per_set": {
"holdout_chips": {
"lb": 2.0153141021728516,
"lb_tuned": 2.004711151123047,
"base": 2.0126824378967285,
"lb_vs_base_rel": 0.0012939341831952333,
"lb_vs_base_ci95": [
0.0007941201329231262,
0.0018241489306092262
],
"lb_tuned_vs_base_rel": -0.0039692046120762825,
"lb_tuned_vs_base_ci95": [
-0.004803930874913931,
-0.0030994447879493237
],
"n_seqs": 23
},
"holdout_physics": {
"lb": 2.017322301864624,
"lb_tuned": 2.0063371658325195,
"base": 2.014240026473999,
"lb_vs_base_rel": 0.001520944177173078,
"lb_vs_base_ci95": [
0.000705586455296725,
0.002274024300277233
],
"lb_tuned_vs_base_rel": -0.0038805464282631874,
"lb_tuned_vs_base_ci95": [
-0.005006139166653156,
-0.002760404022410512
],
"n_seqs": 12
},
"holdout_space": {
"lb": 1.8148294687271118,
"lb_tuned": 1.8054625988006592,
"base": 1.8128981590270996,
"lb_vs_base_rel": 0.001064121606759727,
"lb_vs_base_ci95": [
0.000625382352154702,
0.0014966540038585663
],
"lb_tuned_vs_base_rel": -0.004095692653208971,
"lb_tuned_vs_base_ci95": [
-0.004652173724025488,
-0.003535471623763442
],
"n_seqs": 33
},
"wikipedia": {
"lb": 0.07447204738855362,
"lb_tuned": 0.07450760900974274,
"base": 0.07404302805662155,
"lb_vs_base_rel": 0.00538376672193408,
"lb_vs_base_ci95": [
-0.00044413661817088723,
0.011329266242682934
],
"lb_tuned_vs_base_rel": 0.006360619328916073,
"lb_tuned_vs_base_ci95": [
-0.0016093385638669133,
0.014216705225408077
],
"n_seqs": 16
}
},
"consistency_max_abs": 0.0,
"acceptance": {
"verdict": "FAIL",
"gate_LBA_base_wiki_ppl": 1.0769,
"gate_LBA_ok": true,
"domain_sets_meeting_-2%": "0/3",
"general_rel": 0.006360619328916073,
"consistency_ok": true,
"plan_ci_rule_domain_sets_-2%_and_ci_below_0": "0/3 (informative for LB-B)",
"PASS": false
},
"raw_arrays": {
"file": "verdict.raw.npz",
"keys": 252,
"layout": "<set>/<sequence index>/<arm>, per-token NLL in nats (arm base from the pass nll.npy)"
}
} |