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 tools/colab_scidata.py from STAR-future/Trinity: direct link, hf CLI and curl.
- Browser
- Download file 1.56 kB
-
https://huggingface.co/STAR-future/Trinity/resolve/main/tools/colab_scidata.py
- Command line
-
hf download hf://STAR-future/Trinity/tools/colab_scidata.py
-
curl -L -o colab_scidata.py https://huggingface.co/STAR-future/Trinity/resolve/main/tools/colab_scidata.py
1.56 kB
| """Colab CPU cell: run the SciData mirror (mirror_scidata.py, all sources) where internet egress is free. On a GCE VM | |
| every uploaded GB cost ~0.11 EUR of credits (330 GiB = 35.61 EUR, 21/10-19/11), so the mirror moved here on 2026-11-20. | |
| Sources already on the Hub (folder with SOURCE.json) are skipped, so rerunning the cell on a fresh runtime resumes. | |
| from google.colab import userdata; import os, huggingface_hub as h; os.environ['HF_TOKEN'] = userdata.get('STARHUGGIN') | |
| exec(open(h.hf_hub_download('STAR-future/Trinity', 'tools/colab_scidata.py', token=os.environ['HF_TOKEN'], | |
| force_download=True)).read()) | |
| """ | |
| import os | |
| import subprocess | |
| import sys | |
| from pathlib import Path | |
| from huggingface_hub import hf_hub_download | |
| W = Path("/content/scidata") | |
| W.mkdir(parents=True, exist_ok=True) | |
| tok = W / ".hf_token" | |
| tok.write_text(os.environ["HF_TOKEN"]) | |
| tok.chmod(0o600) | |
| subprocess.run("apt-get install -y -q rsync wget git >/dev/null 2>&1", shell=True) | |
| subprocess.run([sys.executable, "-m", "pip", "install", "-q", "-U", "huggingface_hub", "boto3"], check=True) | |
| src = Path(hf_hub_download("STAR-future/Trinity", "tools/mirror_scidata.py", token=os.environ["HF_TOKEN"], | |
| force_download=True)) | |
| (W / "mirror_scidata.py").write_bytes(src.read_bytes()) | |
| r = subprocess.run([sys.executable, "-u", str(W / "mirror_scidata.py"), "--work", str(W), "--set", "all"], | |
| env=dict(os.environ, HF_TOKEN_FILE=str(tok), HF_HUB_DISABLE_PROGRESS_BARS="1")) | |
| print("mirror exit", r.returncode) | |