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: 3,342 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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | {
"seq": 2048,
"n_seqs": 107,
"streams": 107,
"layers_run": 93,
"new_share_lb_by_layer": {
"0": 0.0,
"1": 0.012912357922330081,
"2": 0.001914051095911554,
"3": 0.0021502058365530223,
"4": 0.006505092649468195,
"5": 0.004906484922481196,
"6": 0.008763108446010363,
"7": 0.013058671362210656,
"8": 0.007426894870456134,
"9": 0.011153461881608607,
"10": 0.008309908037152246,
"11": 0.017418977552067453,
"12": 5.219361494106532e-05,
"13": 0.0054076007288819715,
"14": 0.002363828826852352,
"15": 0.004369717857269483,
"16": 0.003517222179482891,
"17": 0.0013199565414269672,
"18": 0.0015081958061902323,
"19": 0.004924168092172558,
"20": 0.0022605824910939855,
"21": 0.005845684897607175,
"22": 0.0013208122005703572,
"23": 0.001718396324203045,
"24": 0.001282023472676628,
"25": 0.0058627975625899905,
"26": 0.0012483685886678852,
"27": 0.0010547103049129108,
"28": 0.005721903362563837,
"29": 0.004740492175289682,
"30": 0.0034059898832064367,
"31": 0.006811409387911592,
"32": 0.008548059300563045,
"33": 0.007695278361718232,
"34": 0.0069369021672581405,
"35": 0.008568309082118707,
"36": 0.005849392679911629,
"37": 0.008191830765838935,
"38": 0.0024722089956157674,
"39": 0.0019474207602058337,
"40": 0.002489321664950558,
"41": 0.004649795169689667,
"42": 0.009435350697696488,
"43": 0.002576596275511607,
"44": 0.007980203873991409,
"45": 0.011649728761376621,
"46": 0.020172403759766963,
"47": 0.028313468027616216,
"48": 0.003248268207448108,
"49": 0.0010558511805067831,
"50": 0.0029245536561150138,
"51": 0.006850198024413853,
"52": 0.014737138228717252,
"53": 0.0346822293005257,
"54": 0.018487092786442453,
"55": 0.04463580800829647,
"56": 0.01897109581906105,
"57": 0.039171451128253314,
"58": 0.04248446100783125,
"59": 0.055140700574233155,
"60": 0.018356751084815118,
"61": 0.01006252963148127,
"62": 0.02077876282072513,
"63": 0.01433128298686765,
"64": 0.008865498976834188,
"65": 0.011195672910973847,
"66": 0.008957337109354611,
"67": 0.021643237593783952,
"68": 0.03118268995780811,
"69": 0.014716032570419467,
"70": 0.017449209536208172,
"71": 0.012516200124660384,
"72": 0.011549905238446788,
"73": 0.016963495211414645,
"74": 0.011093852789115125,
"75": 0.011286940451746231,
"76": 0.02605602251383189,
"77": 0.024791681477538893,
"78": 0.024700699617790284,
"79": 0.01970009478766506,
"80": 0.027984048544524985,
"81": 0.05479359828701643,
"82": 0.044229667564140304,
"83": 0.052921758285749736,
"84": 0.021164938555072958,
"85": 0.025906001383038325,
"86": 0.023335964915072806,
"87": 0.038659211927067456,
"88": 0.04292254541591506,
"89": 0.047070369054780944,
"90": 0.041675888263037274,
"91": 0.08288431550576308,
"92": 0.07450310593453523
},
"per_set": {
"littleboy": {
"general_wiki": {
"mean_nll": 0.08179357647895813,
"ppl": 1.0852317693437572,
"n_seqs": 32
},
"train_chips": {
"mean_nll": 1.7169617414474487,
"ppl": 5.567586972256274,
"n_seqs": 26
},
"train_physics": {
"mean_nll": 1.9439582824707031,
"ppl": 6.986350259477482,
"n_seqs": 15
},
"train_space": {
"mean_nll": 1.806699514389038,
"ppl": 6.0903132329985805,
"n_seqs": 34
}
}
}
} |