Text Generation
Transformers
Safetensors
llama
finetuned
chat
conversational
text-generation-inference
Instructions to use trillionlabs/Trillion-7B-preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trillionlabs/Trillion-7B-preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trillionlabs/Trillion-7B-preview") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("trillionlabs/Trillion-7B-preview") model = AutoModelForCausalLM.from_pretrained("trillionlabs/Trillion-7B-preview", device_map="auto") 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/Trillion-7B-preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trillionlabs/Trillion-7B-preview" # 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/Trillion-7B-preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trillionlabs/Trillion-7B-preview
- SGLang
How to use trillionlabs/Trillion-7B-preview 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/Trillion-7B-preview" \ --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/Trillion-7B-preview", "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/Trillion-7B-preview" \ --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/Trillion-7B-preview", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use trillionlabs/Trillion-7B-preview with Docker Model Runner:
docker model run hf.co/trillionlabs/Trillion-7B-preview
Add paper link to model card
Browse filesThis PR adds a link to the paper in the model card for better context and discoverability. The paper is: [Trillion-7B-preview](https://huggingface.co/papers/2504.15431).
README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
| 1 |
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
tags:
|
| 4 |
-
- finetuned
|
| 5 |
-
- chat
|
| 6 |
language:
|
| 7 |
- en
|
| 8 |
- ko
|
| 9 |
- ja
|
| 10 |
- zh
|
| 11 |
-
pipeline_tag: text-generation
|
| 12 |
library_name: transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
# Trillion-7B-preview
|
|
@@ -22,7 +22,7 @@ library_name: transformers
|
|
| 22 |
|
| 23 |
## Introduction
|
| 24 |
|
| 25 |
-
We introduce Trillion-7B-preview, a preview of our latest large language model designed to push the boundaries of multilingual scalability and performance.
|
| 26 |
|
| 27 |
|
| 28 |
When comparing performance to training FLOPs for Trillion-7B-preview with competitive models, our model pushes the Pareto frontier, achieving around 66.5% average performance while using significantly fewer compute (~9.3×10²² FLOPs). It outperforms models like Mistral-7B-Instruct-v0.3 and SOLAR-10.7B-Instruct-v1.0 while remaining competitive with models requiring 3-8× more compute such as Qwen2.5-7B-Instruct and EXAONE-3.5-7.8B-Instruct. For full benchmark results, see tables below.
|
|
@@ -240,4 +240,4 @@ This model repository is licensed under the Apache-2.0 License.
|
|
| 240 |
}
|
| 241 |
```
|
| 242 |
## Contact
|
| 243 |
-
For inquiries, please contact: info@trillionlabs.co
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
- ko
|
| 5 |
- ja
|
| 6 |
- zh
|
|
|
|
| 7 |
library_name: transformers
|
| 8 |
+
license: apache-2.0
|
| 9 |
+
pipeline_tag: text-generation
|
| 10 |
+
tags:
|
| 11 |
+
- finetuned
|
| 12 |
+
- chat
|
| 13 |
---
|
| 14 |
|
| 15 |
# Trillion-7B-preview
|
|
|
|
| 22 |
|
| 23 |
## Introduction
|
| 24 |
|
| 25 |
+
We introduce Trillion-7B-preview, a preview of our latest large language model designed to push the boundaries of multilingual scalability and performance. This model is presented in the paper: [Trillion-7B-preview](https://huggingface.co/papers/2504.15431).
|
| 26 |
|
| 27 |
|
| 28 |
When comparing performance to training FLOPs for Trillion-7B-preview with competitive models, our model pushes the Pareto frontier, achieving around 66.5% average performance while using significantly fewer compute (~9.3×10²² FLOPs). It outperforms models like Mistral-7B-Instruct-v0.3 and SOLAR-10.7B-Instruct-v1.0 while remaining competitive with models requiring 3-8× more compute such as Qwen2.5-7B-Instruct and EXAONE-3.5-7.8B-Instruct. For full benchmark results, see tables below.
|
|
|
|
| 240 |
}
|
| 241 |
```
|
| 242 |
## Contact
|
| 243 |
+
For inquiries, please contact: info@trillionlabs.co
|