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_train2_summary.json from STAR-future/Trinity: direct link, hf CLI and curl.
- Browser
- Download file 3.44 kB
-
https://huggingface.co/STAR-future/Trinity/resolve/main/eval/k3pass_train2_summary.json
- Command line
-
hf download hf://STAR-future/Trinity/eval/k3pass_train2_summary.json
-
curl -L -o k3pass_train2_summary.json https://huggingface.co/STAR-future/Trinity/resolve/main/eval/k3pass_train2_summary.json
3.44 kB
| { | |
| "seq": 2048, | |
| "n_seqs": 663, | |
| "streams": 663, | |
| "layers_run": 93, | |
| "new_share_lb_by_layer": { | |
| "0": 0.0, | |
| "1": 0.012315706930054439, | |
| "2": 0.0016871203415918965, | |
| "3": 0.001639157600720521, | |
| "4": 0.004333311971417469, | |
| "5": 0.0050598880933488116, | |
| "6": 0.008834263436260266, | |
| "7": 0.012104799636663536, | |
| "8": 0.006255321069810186, | |
| "9": 0.009440518445075458, | |
| "10": 0.007357728140791078, | |
| "11": 0.017234422687896236, | |
| "12": 3.3187290811638184e-05, | |
| "13": 0.005170266934126885, | |
| "14": 0.0022180249179161375, | |
| "15": 0.00330528846996672, | |
| "16": 0.0030718727358989137, | |
| "17": 0.0014979850160531127, | |
| "18": 0.0012422909710463558, | |
| "19": 0.003182527705392102, | |
| "20": 0.0018348291004989662, | |
| "21": 0.005451737449337275, | |
| "22": 0.0009009820174883775, | |
| "23": 0.0014214379243063845, | |
| "24": 0.001063834476182139, | |
| "25": 0.00512833397506791, | |
| "26": 0.000897483773589932, | |
| "27": 0.0007144703538905756, | |
| "28": 0.006009431242616917, | |
| "29": 0.0044121145127484435, | |
| "30": 0.003028098620940702, | |
| "31": 0.005195813287937308, | |
| "32": 0.006473132785617586, | |
| "33": 0.007435932402888125, | |
| "34": 0.006628666501520356, | |
| "35": 0.008071139853779188, | |
| "36": 0.005485937436888076, | |
| "37": 0.0060540798849245, | |
| "38": 0.001628432689420036, | |
| "39": 0.0017109636198392147, | |
| "40": 0.0021161155667729103, | |
| "41": 0.004348271549573986, | |
| "42": 0.014699161937671009, | |
| "43": 0.0022594054948768916, | |
| "44": 0.0071100433038190835, | |
| "45": 0.010731278452319887, | |
| "46": 0.01203142876314002, | |
| "47": 0.024971434116071344, | |
| "48": 0.0028160866388565052, | |
| "49": 0.001517455503562266, | |
| "50": 0.003087108482102418, | |
| "51": 0.007430408823515989, | |
| "52": 0.014030030703798588, | |
| "53": 0.030995963099180842, | |
| "54": 0.01823556475723401, | |
| "55": 0.059812703772502786, | |
| "56": 0.02237219238712777, | |
| "57": 0.04506769658910563, | |
| "58": 0.03768188999137008, | |
| "59": 0.06036777429136576, | |
| "60": 0.020052672643354936, | |
| "61": 0.012297847447284746, | |
| "62": 0.021437240857209557, | |
| "63": 0.01597155628762409, | |
| "64": 0.011464160649305376, | |
| "65": 0.013174387761202064, | |
| "66": 0.009807281819808536, | |
| "67": 0.02831957611180898, | |
| "68": 0.036475824717527784, | |
| "69": 0.01813618705480122, | |
| "70": 0.019286648933614182, | |
| "71": 0.013995692700001538, | |
| "72": 0.012835656579297323, | |
| "73": 0.017720770470090044, | |
| "74": 0.01232647795938124, | |
| "75": 0.009601207586289082, | |
| "76": 0.024109991393747372, | |
| "77": 0.025557436085506983, | |
| "78": 0.027104074208467614, | |
| "79": 0.02801679361044102, | |
| "80": 0.03161202228963825, | |
| "81": 0.06684334662098151, | |
| "82": 0.04877150885277564, | |
| "83": 0.055513039742614706, | |
| "84": 0.02212634876364811, | |
| "85": 0.0344655769982489, | |
| "86": 0.022351340996171733, | |
| "87": 0.04702275494172562, | |
| "88": 0.06936125407841051, | |
| "89": 0.05028265778138267, | |
| "90": 0.04907198932701736, | |
| "91": 0.11900511382886547, | |
| "92": 0.08189026160702266 | |
| }, | |
| "per_set": { | |
| "littleboy": { | |
| "general_wiki": { | |
| "mean_nll": 0.09477635473012924, | |
| "ppl": 1.0994129491235647, | |
| "n_seqs": 64 | |
| }, | |
| "train_chemistry": { | |
| "mean_nll": 1.856353759765625, | |
| "ppl": 6.4003569341129, | |
| "n_seqs": 151 | |
| }, | |
| "train_chips": { | |
| "mean_nll": 1.905556559562683, | |
| "ppl": 6.723148419095742, | |
| "n_seqs": 150 | |
| }, | |
| "train_physics": { | |
| "mean_nll": 1.844360113143921, | |
| "ppl": 6.324051817782593, | |
| "n_seqs": 149 | |
| }, | |
| "train_space": { | |
| "mean_nll": 1.6743470430374146, | |
| "ppl": 5.335310283466217, | |
| "n_seqs": 149 | |
| } | |
| } | |
| } | |
| } |