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/lbb2/C3_train_record.json from STAR-future/Trinity: direct link, hf CLI and curl.
- Browser
- Download file 2.32 kB
-
https://huggingface.co/STAR-future/Trinity/resolve/bbb24a1be6f28cc30d7ffbb2fe32e2f5841c8ffa/eval/lbb2/C3_train_record.json
- Command line
-
hf download hf://STAR-future/Trinity@bbb24a1be6f28cc30d7ffbb2fe32e2f5841c8ffa/eval/lbb2/C3_train_record.json
-
curl -L -o C3_train_record.json https://huggingface.co/STAR-future/Trinity/resolve/bbb24a1be6f28cc30d7ffbb2fe32e2f5841c8ffa/eval/lbb2/C3_train_record.json
2.32 kB
| { | |
| "args": { | |
| "cache": "/content/k3p/out_train", | |
| "out": "/content/k3p/lbb2/C3", | |
| "rank": 0, | |
| "alpha": 64.0, | |
| "lr": 0.0003, | |
| "epochs": 4.0, | |
| "bs": 2048, | |
| "kl": 1.0, | |
| "val_frac": 0.1, | |
| "seed": 20261119 | |
| }, | |
| "val_before": 1.8403315544128418, | |
| "val_after": 2.1967921257019043, | |
| "val_improved": false, | |
| "val_gen_before": 0.1100296825170517, | |
| "val_gen_after": 0.1197686567902565, | |
| "steps": 267, | |
| "log": [ | |
| { | |
| "step": 0, | |
| "loss_domain": 1.8214353322982788, | |
| "loss_kl": 0.0, | |
| "loss": 1.8214353322982788 | |
| }, | |
| { | |
| "step": 20, | |
| "loss_domain": 1.8199265003204346, | |
| "loss_kl": 0.0016997247003018856, | |
| "loss": 1.8216262250207365 | |
| }, | |
| { | |
| "step": 40, | |
| "loss_domain": 1.7496938705444336, | |
| "loss_kl": 0.003994224593043327, | |
| "loss": 1.753688095137477 | |
| }, | |
| { | |
| "step": 60, | |
| "loss_domain": 1.5761046409606934, | |
| "loss_kl": 0.003511431161314249, | |
| "loss": 1.5796160721220076 | |
| }, | |
| { | |
| "step": 80, | |
| "loss_domain": 1.3748921155929565, | |
| "loss_kl": 0.006646399386227131, | |
| "loss": 1.3815385149791837 | |
| }, | |
| { | |
| "step": 100, | |
| "loss_domain": 1.1760282516479492, | |
| "loss_kl": 0.007229830138385296, | |
| "loss": 1.1832580817863345 | |
| }, | |
| { | |
| "step": 120, | |
| "loss_domain": 1.0329723358154297, | |
| "loss_kl": 0.007366295903921127, | |
| "loss": 1.0403386317193508 | |
| }, | |
| { | |
| "step": 140, | |
| "loss_domain": 0.8769220113754272, | |
| "loss_kl": 0.005215068813413382, | |
| "loss": 0.8821370801888406 | |
| }, | |
| { | |
| "step": 160, | |
| "loss_domain": 0.793992817401886, | |
| "loss_kl": 0.005210679955780506, | |
| "loss": 0.7992034973576665 | |
| }, | |
| { | |
| "step": 180, | |
| "loss_domain": 0.7358309626579285, | |
| "loss_kl": 0.005715416744351387, | |
| "loss": 0.7415463794022799 | |
| }, | |
| { | |
| "step": 200, | |
| "loss_domain": 0.587510883808136, | |
| "loss_kl": 0.004426141269505024, | |
| "loss": 0.591937025077641 | |
| }, | |
| { | |
| "step": 220, | |
| "loss_domain": 0.6057475209236145, | |
| "loss_kl": 0.008054204285144806, | |
| "loss": 0.6138017252087593 | |
| }, | |
| { | |
| "step": 240, | |
| "loss_domain": 0.5273832678794861, | |
| "loss_kl": 0.003859985852614045, | |
| "loss": 0.5312432537321001 | |
| }, | |
| { | |
| "step": 260, | |
| "loss_domain": 0.538628339767456, | |
| "loss_kl": 0.003214716911315918, | |
| "loss": 0.541843056678772 | |
| }, | |
| { | |
| "step": 266, | |
| "loss_domain": 0.5453127026557922, | |
| "loss_kl": 0.003492699470371008, | |
| "loss": 0.5488054021261632 | |
| } | |
| ] | |
| } |