Text Generation
Transformers
Safetensors
English
Korean
Japanese
llama
finetuned
chat
conversational
text-generation-inference
Instructions to use trillionlabs/Tri-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trillionlabs/Tri-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trillionlabs/Tri-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("trillionlabs/Tri-7B") model = AutoModelForCausalLM.from_pretrained("trillionlabs/Tri-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use trillionlabs/Tri-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trillionlabs/Tri-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trillionlabs/Tri-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trillionlabs/Tri-7B
- SGLang
How to use trillionlabs/Tri-7B 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 "trillionlabs/Tri-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trillionlabs/Tri-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "trillionlabs/Tri-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trillionlabs/Tri-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use trillionlabs/Tri-7B with Docker Model Runner:
docker model run hf.co/trillionlabs/Tri-7B
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +11 -1
- assets/pareto-tri.png +3 -0
.gitattributes
CHANGED
|
@@ -36,3 +36,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 36 |
assets/Signiture_Black_White_BG_resized.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
assets/Signiture_Trillion_BlackBG.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
assets/Signiture_Trillion_WhiteBG.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 36 |
assets/Signiture_Black_White_BG_resized.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
assets/Signiture_Trillion_BlackBG.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
assets/Signiture_Trillion_WhiteBG.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
assets/pareto-tri.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -9,7 +9,11 @@ language:
|
|
| 9 |
- ja
|
| 10 |
pipeline_tag: text-generation
|
| 11 |
library_name: transformers
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# Tri-7B
|
| 15 |
|
|
@@ -29,6 +33,12 @@ We introduce **Tri-7B**, the next generation model following Trillion-7B-preview
|
|
| 29 |
|
| 30 |
Our **Tri-7B** model represents a significant advancement over Trillion-7B-preview, achieving substantial performance improvements across all evaluated domains while maintaining the same efficient parameter count.
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
### Model Specifications
|
| 33 |
|
| 34 |
#### Tri-7B
|
|
|
|
| 9 |
- ja
|
| 10 |
pipeline_tag: text-generation
|
| 11 |
library_name: transformers
|
| 12 |
+
extra_gated_fields:
|
| 13 |
+
Full Name: text
|
| 14 |
+
Email: text
|
| 15 |
+
Organization: text
|
| 16 |
+
ㄴ---
|
| 17 |
|
| 18 |
# Tri-7B
|
| 19 |
|
|
|
|
| 33 |
|
| 34 |
Our **Tri-7B** model represents a significant advancement over Trillion-7B-preview, achieving substantial performance improvements across all evaluated domains while maintaining the same efficient parameter count.
|
| 35 |
|
| 36 |
+
|
| 37 |
+
<p align="center">
|
| 38 |
+
<img src="assets/pareto-tri.png" alt="Average Performance vs. Approximate Training FLOPs" width="700">
|
| 39 |
+
</p>
|
| 40 |
+
|
| 41 |
+
|
| 42 |
### Model Specifications
|
| 43 |
|
| 44 |
#### Tri-7B
|
assets/pareto-tri.png
ADDED
|
Git LFS Details
|