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/h2b/U1_train_record.json from STAR-future/Trinity: direct link, hf CLI and curl.
- Browser
- Download file 1.51 kB
-
https://huggingface.co/STAR-future/Trinity/resolve/main/eval/h2b/U1_train_record.json
- Command line
-
hf download hf://STAR-future/Trinity/eval/h2b/U1_train_record.json
-
curl -L -o U1_train_record.json https://huggingface.co/STAR-future/Trinity/resolve/main/eval/h2b/U1_train_record.json
1.51 kB
| { | |
| "args": { | |
| "cmd": "train", | |
| "cache": "/content/k3p/out_train", | |
| "out": "/content/k3p/h2b/U1", | |
| "trained": "", | |
| "k": 16, | |
| "lr": 1e-05, | |
| "epochs": 2.0, | |
| "bs": 2048, | |
| "kl": 1.0, | |
| "val_frac": 0.1, | |
| "seed": 20261119 | |
| }, | |
| "unfrozen_experts": [ | |
| 565, | |
| 840, | |
| 879, | |
| 39, | |
| 472, | |
| 631, | |
| 621, | |
| 227, | |
| 590, | |
| 883, | |
| 479, | |
| 666, | |
| 410, | |
| 559, | |
| 882, | |
| 87 | |
| ], | |
| "trained_parameters": 528482304, | |
| "val_before": 1.8403315544128418, | |
| "identity_check": 1.8403819799423218, | |
| "val_after": 1.8348989486694336, | |
| "val_gen_before": 0.1100296825170517, | |
| "val_gen_after": 0.11003688722848892, | |
| "rel_dom": -0.002951971198005936, | |
| "rel_gen": 6.547970758807562e-05, | |
| "delta_W_abs_sum": 45146.78234863281, | |
| "steps": 133, | |
| "log": [ | |
| { | |
| "step": 0, | |
| "loss_domain": 1.8212523460388184, | |
| "loss_kl": 6.988088898651768e-07 | |
| }, | |
| { | |
| "step": 20, | |
| "loss_domain": 1.8575013875961304, | |
| "loss_kl": 1.7852239579951856e-06 | |
| }, | |
| { | |
| "step": 40, | |
| "loss_domain": 1.841360330581665, | |
| "loss_kl": 1.1722261206159601e-07 | |
| }, | |
| { | |
| "step": 60, | |
| "loss_domain": 1.8352367877960205, | |
| "loss_kl": 1.1438814908615313e-06 | |
| }, | |
| { | |
| "step": 80, | |
| "loss_domain": 1.8067381381988525, | |
| "loss_kl": 2.634013071656227e-06 | |
| }, | |
| { | |
| "step": 100, | |
| "loss_domain": 1.7081639766693115, | |
| "loss_kl": 6.104537533246912e-07 | |
| }, | |
| { | |
| "step": 120, | |
| "loss_domain": 1.750873327255249, | |
| "loss_kl": 2.757104198281013e-07 | |
| }, | |
| { | |
| "step": 132, | |
| "loss_domain": 1.8461107015609741, | |
| "loss_kl": 3.3811480193435273e-07 | |
| } | |
| ] | |
| } |