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
H6 mode + parametric bpb dir
Browse files
tools/colab_bpb_compare.py
CHANGED
|
@@ -26,6 +26,7 @@ TOK = os.environ["HF_TOKEN"]
|
|
| 26 |
REPO = "STAR-future/Trinity"
|
| 27 |
BASE = "moonshotai/Kimi-K3.1-Pro"
|
| 28 |
W = Path("/content/k3p")
|
|
|
|
| 29 |
OPEN = [m for m in os.environ.get("BPB_MODELS", "Qwen/Qwen3.8-27B,google/gemma-4-31B").split(",") if m]
|
| 30 |
api = HfApi(token=TOK)
|
| 31 |
LN2 = math.log(2)
|
|
@@ -41,7 +42,7 @@ for r in all_rows:
|
|
| 41 |
if len(ids_full) >= 2048:
|
| 42 |
kept.append((r, ids_full[:2048]))
|
| 43 |
|
| 44 |
-
raw = next((W /
|
| 45 |
z = np.load(raw)
|
| 46 |
per = {}
|
| 47 |
for k in z.files:
|
|
@@ -132,9 +133,9 @@ def summarize_and_save(res_obj):
|
|
| 132 |
"n": int(len(ix)),
|
| 133 |
}
|
| 134 |
res_obj["summary"] = summary
|
| 135 |
-
out = W /
|
| 136 |
out.write_text(json.dumps(res_obj, indent=1))
|
| 137 |
-
api.upload_file(path_or_fileobj=str(out), path_in_repo="eval/
|
| 138 |
commit_message="Sealed holdout: bits per byte, Trinity vs open models")
|
| 139 |
return summary
|
| 140 |
|
|
|
|
| 26 |
REPO = "STAR-future/Trinity"
|
| 27 |
BASE = "moonshotai/Kimi-K3.1-Pro"
|
| 28 |
W = Path("/content/k3p")
|
| 29 |
+
BPB_DIR = os.environ.get("BPB_DIR", "h5_sealed") # 2026-11-24: h6_sealed for the H6 specialisation
|
| 30 |
OPEN = [m for m in os.environ.get("BPB_MODELS", "Qwen/Qwen3.8-27B,google/gemma-4-31B").split(",") if m]
|
| 31 |
api = HfApi(token=TOK)
|
| 32 |
LN2 = math.log(2)
|
|
|
|
| 42 |
if len(ids_full) >= 2048:
|
| 43 |
kept.append((r, ids_full[:2048]))
|
| 44 |
|
| 45 |
+
raw = next((W / BPB_DIR).glob("*.raw.npz"))
|
| 46 |
z = np.load(raw)
|
| 47 |
per = {}
|
| 48 |
for k in z.files:
|
|
|
|
| 133 |
"n": int(len(ix)),
|
| 134 |
}
|
| 135 |
res_obj["summary"] = summary
|
| 136 |
+
out = W / BPB_DIR / "bpb_compare.json"
|
| 137 |
out.write_text(json.dumps(res_obj, indent=1))
|
| 138 |
+
api.upload_file(path_or_fileobj=str(out), path_in_repo=f"eval/{BPB_DIR}/bpb_compare.json", repo_id=REPO,
|
| 139 |
commit_message="Sealed holdout: bits per byte, Trinity vs open models")
|
| 140 |
return summary
|
| 141 |
|