Instructions to use mykor/Tri-7B-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use mykor/Tri-7B-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="mykor/Tri-7B-gguf", filename="Tri-7B-BF16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use mykor/Tri-7B-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf mykor/Tri-7B-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf mykor/Tri-7B-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf mykor/Tri-7B-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf mykor/Tri-7B-gguf:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf mykor/Tri-7B-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf mykor/Tri-7B-gguf:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf mykor/Tri-7B-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf mykor/Tri-7B-gguf:Q4_K_M
Use Docker
docker model run hf.co/mykor/Tri-7B-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use mykor/Tri-7B-gguf with Ollama:
ollama run hf.co/mykor/Tri-7B-gguf:Q4_K_M
- Unsloth Studio new
How to use mykor/Tri-7B-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for mykor/Tri-7B-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for mykor/Tri-7B-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for mykor/Tri-7B-gguf to start chatting
- Pi new
How to use mykor/Tri-7B-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf mykor/Tri-7B-gguf:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mykor/Tri-7B-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use mykor/Tri-7B-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf mykor/Tri-7B-gguf:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default mykor/Tri-7B-gguf:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use mykor/Tri-7B-gguf with Docker Model Runner:
docker model run hf.co/mykor/Tri-7B-gguf:Q4_K_M
- Lemonade
How to use mykor/Tri-7B-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mykor/Tri-7B-gguf:Q4_K_M
Run and chat with the model
lemonade run user.Tri-7B-gguf-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = "No input example has been defined for this model task."
)
Tri-7B
Introduction
We introduce Tri-7B, the next generation model following Trillion-7B-preview, that continues to push the boundaries of efficient training while achieving exceptional performance at the 7B parameter scale.
Key Highlights
- Enhanced Reasoning: Modified training dataset mixture specifically optimized for reasoning capabilities
- Advanced Post-Training: Significantly improved RL training pipeline focusing on mathematical reasoning and everyday usage
- Extended Context: Supports up to 32K context length for long-form understanding
- Multi-lingual: Specially optimized for Korean, English, and Japanese.
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.
Model Specifications
Tri-7B
- Type: Causal Language Model
- Training Stage: Pre-training & Post-training
- Architecture: Transformer Decoder with RoPE, SwiGLU, RMSNorm
- Number of Parameters: 7.76B
- Number of Layers: 32
- Number of Attention Heads: 32
- Context Length: 32,768
- Vocab Size: 128,256
Quickstart
Here is a code snippet with apply_chat_template that demonstrates how to load the tokenizer and model and generate text.
Tri-7B Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "trillionlabs/Tri-7B"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Explain the concept of quantum computing in simple terms."
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
Tri-7B is also available with vLLM and SGLang!
# vLLM
vllm serve trillionlabs/Tri-7B --dtype bfloat16 --max-model-len 32768
# vLLM with custom options
vllm serve trillionlabs/Tri-7B \
--dtype bfloat16 \
--max-model-len 32768 \
--gpu-memory-utilization 0.95 \
--port 8000
# SGLang
python3 -m sglang.launch_server --model-path trillionlabs/Tri-7B --dtype bfloat16
# SGLang with custom options
python3 -m sglang.launch_server \
--model-path trillionlabs/Tri-7B \
--dtype bfloat16 \
--context-length 32768 \
--port 30000 \
--host 0.0.0.0
Evaluation
We evaluated Tri-7B across a comprehensive suite of benchmarks assessing general reasoning, knowledge recall, coding abilities, mathematical reasoning, and instruction-following capabilities. Compared to our previous generation model Trillion-7B-preview, Tri-7B achieves significant gains across all domains.
Full evaluation settings
| Benchmark | Language | Evaluation Setting | Metric |
|---|---|---|---|
| General Reasoning and Factuality | |||
| โข HellaSwag | English | 0-shot | accuracy |
| โข ARC:C | English | 0-shot | accuracy |
| โข HAERAE | Korean | 3-shot | accuracy |
| โข CLIcK | Korean | 0-shot | accuracy |
| โข KoBEST | Korean | 5-shot | accuracy |
| Knowledge and Reasoning | |||
| โข KMMLU | Korean | 5-shot | accuracy |
| โข MMLU | English | 5-shot | accuracy |
| โข Global-MMLU-Lite-ja | English | 5-shot | accuracy |
| Coding | |||
| โข HumanEval | English | 0-shot | pass@1 |
| โข MBPPPlus | English | 0-shot | pass@1 |
| Mathematical Reasoning | |||
| โข GSM8k | English | 0-shot, CoT | exact-match |
| โข MATH | English | 0-shot, CoT | exact-match |
| โข GPQA | English | 4-shot | accuracy |
| โข HRM8k | Korean | 0-shot, CoT | exact-match |
| Instruction Following and Chat | |||
| โข IFEval | English | 0-shot | strict-average |
| โข koIFEval | Korean | 0-shot | strict-average |
| โข MT-Bench | English | LLM-as-a-judge (gpt-4o) | LLM score |
| โข KO-MT-Bench | Korean | LLM-as-a-judge (gpt-4o) | LLM score |
| โข systemIFEval | English | 0-shot | strict-average |
- *Note that koIFEval, systemIFEval, and KoRuler are our in-house evaluation benchmarks adapted for Korean to better assess model capabilities in Korean language tasks.
- **Note that MT-Bench, KO-MT-Bench, and LogicKor use a 10-point scale.
Benchmark Results
Models compared:
- Tri-7B (Next Generation)
- Trillion-7B-preview (Previous Generation)
General Reasoning and Factuality
| Benchmark | Tri-7B | Trillion-7B-preview | Improvement |
|---|---|---|---|
| HellaSwag | 59.52 | 58.94 | +0.58 |
| ARC:C | 58.28 | 54.44 | +3.84 |
| HAERAE | 82.49 | 80.02 | +2.47 |
| KoBEST | 82.72 | 79.61 | +3.11 |
| CLIcK | 64.43 | 60.41 | +4.02 |
| KMMLU | 51.74 | 48.09 | +3.65 |
| MMLU | 68.16 | 63.52 | +4.64 |
| Global-MMLU-Lite-ja | 59.25 | 60.75 | -1.50 |
Coding
| Benchmark | Tri-7B | Trillion-7B-preview | Improvement |
|---|---|---|---|
| HumanEval | 53.66 | 55.48 | -1.82 |
| MBPPPlus | 64.29 | 58.99 | +5.30 |
Mathematical Reasoning
| Benchmark | Tri-7B | Trillion-7B-preview | Improvement |
|---|---|---|---|
| GSM8k | 77.94 | 72.25 | +5.69 |
| MATH | 49.40 | 32.70 | +16.70 |
| GPQA | 34.15 | 32.81 | +1.34 |
| HRM8k | 39.08 | 30.10 | +8.98 |
Instruction Following and Chat
| Benchmark | Tri-7B | Trillion-7B-preview | Improvement |
|---|---|---|---|
| IFEval | 79.26 | 79.13 | +0.13 |
| koIFEval | 76.63 | 66.58 | +10.05 |
| MT-Bench | 7.82 | 6.53 | +1.29 |
| KO-MT-Bench | 7.64 | 6.27 | +1.37 |
| systemIFEval | 66.43 | 27.28 | +39.15 |
Limitations
- Language Support: The model is optimized for English, Korean, and Japanese. Usage with other languages may result in degraded performance.
- Knowledge Cutoff: The model's information is limited to data available up to Febuary, 2025.
License
This model is licensed under the Apache License 2.0.
Contact
For inquiries, please contact: info@trillionlabs.co
- Downloads last month
- 195
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for mykor/Tri-7B-gguf
Base model
trillionlabs/Tri-7B
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="mykor/Tri-7B-gguf", filename="", )