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/k3pass_train3_summary.json from STAR-future/Trinity: direct link, hf CLI and curl.
- Browser
- Download file 3.23 kB
-
https://huggingface.co/STAR-future/Trinity/resolve/f8aef0743bc8ed88e849346528d7dfe34ec00228/eval/k3pass_train3_summary.json
- Command line
-
hf download hf://STAR-future/Trinity@f8aef0743bc8ed88e849346528d7dfe34ec00228/eval/k3pass_train3_summary.json
-
curl -L -o k3pass_train3_summary.json https://huggingface.co/STAR-future/Trinity/resolve/f8aef0743bc8ed88e849346528d7dfe34ec00228/eval/k3pass_train3_summary.json
3.23 kB
| { | |
| "seq": 2048, | |
| "n_seqs": 364, | |
| "streams": 364, | |
| "layers_run": 93, | |
| "new_share_lb_by_layer": { | |
| "0": 0.0, | |
| "1": 0.012713421750199664, | |
| "2": 0.0018307193218228908, | |
| "3": 0.00198246884558882, | |
| "4": 0.005532233382237481, | |
| "5": 0.0048086983612278, | |
| "6": 0.008757622677136909, | |
| "7": 0.011760837490578274, | |
| "8": 0.006916926365222904, | |
| "9": 0.010374551321697104, | |
| "10": 0.008036183745978953, | |
| "11": 0.017398708407859224, | |
| "12": 4.879458934977935e-05, | |
| "13": 0.005300584796734236, | |
| "14": 0.0022445510827250534, | |
| "15": 0.0046273535936252105, | |
| "16": 0.0028570825259641303, | |
| "17": 0.0013202206221419376, | |
| "18": 0.0019503583016058246, | |
| "19": 0.005006643503413096, | |
| "20": 0.001372955639713577, | |
| "21": 0.005810161167244007, | |
| "22": 0.0010962853167246986, | |
| "23": 0.0018953595919391285, | |
| "24": 0.0012012523737132221, | |
| "25": 0.0054784922011114736, | |
| "26": 0.0012483701652304812, | |
| "27": 0.0009596269196513426, | |
| "28": 0.005938938747231777, | |
| "29": 0.005062899777440579, | |
| "30": 0.003550351341510867, | |
| "31": 0.006038623913140088, | |
| "32": 0.006965385616890022, | |
| "33": 0.007753476991758242, | |
| "34": 0.00655574596660969, | |
| "35": 0.008400801743206742, | |
| "36": 0.005555456765200738, | |
| "37": 0.0067457261157559826, | |
| "38": 0.0019875830423168755, | |
| "39": 0.0019128820193665369, | |
| "40": 0.0023668729444290253, | |
| "41": 0.004468310081942396, | |
| "42": 0.012594872809291542, | |
| "43": 0.0024352020988302244, | |
| "44": 0.007137005258310627, | |
| "45": 0.011659727042929812, | |
| "46": 0.01464105962396978, | |
| "47": 0.026218037110763592, | |
| "48": 0.003295814580089607, | |
| "49": 0.0009558541344601539, | |
| "50": 0.0025276770958533655, | |
| "51": 0.0073487837594207175, | |
| "52": 0.012530483950216036, | |
| "53": 0.036065237453350656, | |
| "54": 0.01671164368207638, | |
| "55": 0.04964941711379932, | |
| "56": 0.020490206389145536, | |
| "57": 0.03468004143336317, | |
| "58": 0.041632012597152164, | |
| "59": 0.05807637611588279, | |
| "60": 0.02002036973711226, | |
| "61": 0.011012485997935573, | |
| "62": 0.02394732777643335, | |
| "63": 0.01626980975065585, | |
| "64": 0.007957123158561005, | |
| "65": 0.011753794972549428, | |
| "66": 0.00871821819385002, | |
| "67": 0.024567153458330004, | |
| "68": 0.03402743484456461, | |
| "69": 0.015630533417256978, | |
| "70": 0.018532805676971163, | |
| "71": 0.012462574118686901, | |
| "72": 0.011635329799501451, | |
| "73": 0.01649860757310967, | |
| "74": 0.01124480532502735, | |
| "75": 0.010542062500102834, | |
| "76": 0.02777862559062439, | |
| "77": 0.025307456154253456, | |
| "78": 0.02316678204870486, | |
| "79": 0.017630859922904234, | |
| "80": 0.027637020613138493, | |
| "81": 0.061845632536070685, | |
| "82": 0.044201945005864884, | |
| "83": 0.055128244703615104, | |
| "84": 0.020830175419757655, | |
| "85": 0.025329673765124856, | |
| "86": 0.02195580459230549, | |
| "87": 0.04126689188018605, | |
| "88": 0.04669306885737639, | |
| "89": 0.049685718962451914, | |
| "90": 0.04320190779373541, | |
| "91": 0.09023159210171018, | |
| "92": 0.07779341453051829 | |
| }, | |
| "per_set": { | |
| "littleboy": { | |
| "general_wiki": { | |
| "mean_nll": 0.12713955342769623, | |
| "ppl": 1.1355754801749103, | |
| "n_seqs": 64 | |
| }, | |
| "train_chips": { | |
| "mean_nll": 1.9303408861160278, | |
| "ppl": 6.891859180306433, | |
| "n_seqs": 151 | |
| }, | |
| "train_space": { | |
| "mean_nll": 1.6638306379318237, | |
| "ppl": 5.2794959963845125, | |
| "n_seqs": 149 | |
| } | |
| } | |
| } | |
| } |