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/h5_sealed/k3pass_sealed_summary.json from STAR-future/Trinity: direct link, hf CLI and curl.
- Browser
- Download file 3.78 kB
-
https://huggingface.co/STAR-future/Trinity/resolve/main/eval/h5_sealed/k3pass_sealed_summary.json
- Command line
-
hf download hf://STAR-future/Trinity/eval/h5_sealed/k3pass_sealed_summary.json
-
curl -L -o k3pass_sealed_summary.json https://huggingface.co/STAR-future/Trinity/resolve/main/eval/h5_sealed/k3pass_sealed_summary.json
3.78 kB
| { | |
| "seq": 2048, | |
| "n_seqs": 61, | |
| "streams": 122, | |
| "layers_run": 93, | |
| "new_share_lb_by_layer": { | |
| "0": 0.0, | |
| "1": 0.0131130525842309, | |
| "2": 0.0020221646409481764, | |
| "3": 0.002114717848598957, | |
| "4": 0.005645251367241144, | |
| "5": 0.005657258443534374, | |
| "6": 0.008566433563828468, | |
| "7": 0.011608686298131943, | |
| "8": 0.007294200826436281, | |
| "9": 0.010862256400287151, | |
| "10": 0.0081386873498559, | |
| "11": 0.017898809164762497, | |
| "12": 2.901671177824028e-05, | |
| "13": 0.0052840434946119785, | |
| "14": 0.00227681128308177, | |
| "15": 0.00409585889428854, | |
| "16": 0.002736075781285763, | |
| "17": 0.0019651318434625864, | |
| "18": 0.0008865105919539928, | |
| "19": 0.0021382314153015614, | |
| "20": 0.002248795237392187, | |
| "21": 0.006044481415301561, | |
| "22": 0.001066114054992795, | |
| "23": 0.002263803733512759, | |
| "24": 0.0014278223970904946, | |
| "25": 0.006194067653268576, | |
| "26": 0.0016219341196119785, | |
| "27": 0.0011256482684984803, | |
| "28": 0.005844866391271353, | |
| "29": 0.005684273783117533, | |
| "30": 0.0037081355694681406, | |
| "31": 0.006534263491630554, | |
| "32": 0.006418696604669094, | |
| "33": 0.0083523103967309, | |
| "34": 0.006142537575215101, | |
| "35": 0.008167704567313194, | |
| "36": 0.005561703350394964, | |
| "37": 0.005623738747090101, | |
| "38": 0.0023063283879309893, | |
| "39": 0.0018375583458691835, | |
| "40": 0.0023028263822197914, | |
| "41": 0.004143386147916317, | |
| "42": 0.010738184675574303, | |
| "43": 0.0024098879657685757, | |
| "44": 0.007363741286098957, | |
| "45": 0.0114555973559618, | |
| "46": 0.013778435997664928, | |
| "47": 0.02652277611196041, | |
| "48": 0.003621085546910763, | |
| "49": 0.001872578519396484, | |
| "50": 0.0033289173152297735, | |
| "51": 0.006531761959195137, | |
| "52": 0.011156925931572914, | |
| "53": 0.031000854447484016, | |
| "54": 0.022277330979704857, | |
| "55": 0.05358286201953888, | |
| "56": 0.01953274942934513, | |
| "57": 0.041190724819898605, | |
| "58": 0.03829755634069443, | |
| "59": 0.05766221135854721, | |
| "60": 0.023286912590265274, | |
| "61": 0.012763851322233677, | |
| "62": 0.023227877914905548, | |
| "63": 0.017283953726291656, | |
| "64": 0.013147572055459023, | |
| "65": 0.013407221995294094, | |
| "66": 0.009975745342671871, | |
| "67": 0.0287590641528368, | |
| "68": 0.03948524221777916, | |
| "69": 0.016939256340265274, | |
| "70": 0.02120971493422985, | |
| "71": 0.014433813281357288, | |
| "72": 0.014058096334338188, | |
| "73": 0.01674664579331875, | |
| "74": 0.014237700030207634, | |
| "75": 0.010539069771766663, | |
| "76": 0.030390003696084023, | |
| "77": 0.029951250180602074, | |
| "78": 0.026156064122915268, | |
| "79": 0.026370687410235405, | |
| "80": 0.03692026436328888, | |
| "81": 0.07409167289733887, | |
| "82": 0.054542914032936096, | |
| "83": 0.06197419390082359, | |
| "84": 0.019097499549388885, | |
| "85": 0.04209624603390694, | |
| "86": 0.029580537229776382, | |
| "87": 0.048611998558044434, | |
| "88": 0.060033075511455536, | |
| "89": 0.04846141114830971, | |
| "90": 0.052140530198812485, | |
| "91": 0.10788613557815552, | |
| "92": 0.08617613464593887 | |
| }, | |
| "per_set": { | |
| "littleboy": { | |
| "holdout_chips": { | |
| "mean_nll": 1.9697812795639038, | |
| "ppl": 7.16910828636314, | |
| "n_seqs": 15 | |
| }, | |
| "holdout_physics": { | |
| "mean_nll": 2.0336203575134277, | |
| "ppl": 7.64170203267993, | |
| "n_seqs": 15 | |
| }, | |
| "holdout_space": { | |
| "mean_nll": 1.6956207752227783, | |
| "ppl": 5.450028157757298, | |
| "n_seqs": 15 | |
| }, | |
| "wikipedia": { | |
| "mean_nll": 1.4581893682479858, | |
| "ppl": 4.298170075343834, | |
| "n_seqs": 16 | |
| } | |
| }, | |
| "base": { | |
| "holdout_chips": { | |
| "mean_nll": 1.9667123556137085, | |
| "ppl": 7.147140564117579, | |
| "n_seqs": 15 | |
| }, | |
| "holdout_physics": { | |
| "mean_nll": 2.0305309295654297, | |
| "ppl": 7.618129975684482, | |
| "n_seqs": 15 | |
| }, | |
| "holdout_space": { | |
| "mean_nll": 1.6933352947235107, | |
| "ppl": 5.437586447740785, | |
| "n_seqs": 15 | |
| }, | |
| "wikipedia": { | |
| "mean_nll": 1.4576598405838013, | |
| "ppl": 4.29589467787969, | |
| "n_seqs": 16 | |
| } | |
| } | |
| } | |
| } |