Instructions to use QuantFactory/INTELLECT-1-Instruct-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use QuantFactory/INTELLECT-1-Instruct-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/INTELLECT-1-Instruct-GGUF", filename="INTELLECT-1-Instruct.Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use QuantFactory/INTELLECT-1-Instruct-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/INTELLECT-1-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/INTELLECT-1-Instruct-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 QuantFactory/INTELLECT-1-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/INTELLECT-1-Instruct-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 QuantFactory/INTELLECT-1-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/INTELLECT-1-Instruct-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 QuantFactory/INTELLECT-1-Instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/INTELLECT-1-Instruct-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/INTELLECT-1-Instruct-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/INTELLECT-1-Instruct-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/INTELLECT-1-Instruct-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/INTELLECT-1-Instruct-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantFactory/INTELLECT-1-Instruct-GGUF:Q4_K_M
- Ollama
How to use QuantFactory/INTELLECT-1-Instruct-GGUF with Ollama:
ollama run hf.co/QuantFactory/INTELLECT-1-Instruct-GGUF:Q4_K_M
- Unsloth Studio
How to use QuantFactory/INTELLECT-1-Instruct-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 QuantFactory/INTELLECT-1-Instruct-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 QuantFactory/INTELLECT-1-Instruct-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/INTELLECT-1-Instruct-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/INTELLECT-1-Instruct-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/INTELLECT-1-Instruct-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/INTELLECT-1-Instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/INTELLECT-1-Instruct-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.INTELLECT-1-Instruct-GGUF-Q4_K_M
List all available models
lemonade list
Upload README.md with huggingface_hub
Brow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|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
---
|
| 3 |
+
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
datasets:
|
| 6 |
+
- PrimeIntellect/fineweb-edu
|
| 7 |
+
- PrimeIntellect/fineweb
|
| 8 |
+
- PrimeIntellect/StackV1-popular
|
| 9 |
+
- mlfoundations/dclm-baseline-1.0-parquet
|
| 10 |
+
- open-web-math/open-web-math
|
| 11 |
+
- arcee-ai/EvolKit-75K
|
| 12 |
+
- arcee-ai/Llama-405B-Logits
|
| 13 |
+
- arcee-ai/The-Tomb
|
| 14 |
+
- mlabonne/open-perfectblend-fixed
|
| 15 |
+
- microsoft/orca-agentinstruct-1M-v1-cleaned
|
| 16 |
+
- Post-training-Data-Flywheel/AutoIF-instruct-61k-with-funcs
|
| 17 |
+
- Team-ACE/ToolACE
|
| 18 |
+
- Synthia-coder
|
| 19 |
+
- ServiceNow-AI/M2Lingual
|
| 20 |
+
- AI-MO/NuminaMath-TIR
|
| 21 |
+
- allenai/tulu-3-sft-personas-code
|
| 22 |
+
- allenai/tulu-3-sft-personas-math
|
| 23 |
+
- allenai/tulu-3-sft-personas-math-grade
|
| 24 |
+
- allenai/tulu-3-sft-personas-algebra
|
| 25 |
+
language:
|
| 26 |
+
- en
|
| 27 |
+
base_model:
|
| 28 |
+
- PrimeIntellect/INTELLECT-1
|
| 29 |
+
pipeline_tag: text-generation
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
[](https://hf.co/QuantFactory)
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
# QuantFactory/INTELLECT-1-Instruct-GGUF
|
| 37 |
+
This is quantized version of [PrimeIntellect/INTELLECT-1-Instruct](https://huggingface.co/PrimeIntellect/INTELLECT-1-Instruct) created using llama.cpp
|
| 38 |
+
|
| 39 |
+
# Original Model Card
|
| 40 |
+
|
| 41 |
+
# INTELLECT-1
|
| 42 |
+
|
| 43 |
+
## **Model Overview**
|
| 44 |
+
**INTELLECT-1** is the first collaboratively trained 10 billion parameter language model trained from scratch on 1 trillion tokens of English text and code.
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
|
| 48 |
+
This is an instruct model. The base model associated with it is [INTELLECT-1](https://huggingface.co/PrimeIntellect/INTELLECT-1).
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
**INTELLECT-1** was trained on up to 14 concurrent nodes distributed across 3 continents, with contributions from 30 independent community contributors providing compute.
|
| 52 |
+
The training code utilizes the [prime framework](https://github.com/PrimeIntellect-ai/prime), a scalable distributed training framework designed for fault-tolerant, dynamically scaling, high-perfomance training on unreliable, globally distributed workers.
|
| 53 |
+
The key abstraction that allows dynamic scaling is the `ElasticDeviceMesh` which manages dynamic global process groups for fault-tolerant communication across the internet and local process groups for communication within a node.
|
| 54 |
+
The model was trained using the [DiLoCo](https://arxiv.org/abs/2311.08105) algorithms with 100 inner steps. The global all-reduce was done with custom int8 all-reduce kernels to reduce the communication payload required, greatly reducing the communication overhead by a factor 400x.
|
| 55 |
+
|
| 56 |
+
For more detailed technical insights, please refer to our [technical paper](https://github.com/PrimeIntellect-ai/prime).
|
| 57 |
+
|
| 58 |
+
**Note: You must add a BOS token at the beginning of each sample. Performance may be impacted otherwise.**
|
| 59 |
+
|
| 60 |
+
## Usage
|
| 61 |
+
```python
|
| 62 |
+
import torch
|
| 63 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 64 |
+
|
| 65 |
+
torch.set_default_device("cuda")
|
| 66 |
+
model = AutoModelForCausalLM.from_pretrained("PrimeIntellect/INTELLECT-1-Instruct")
|
| 67 |
+
tokenizer = AutoTokenizer.from_pretrained("PrimeIntellect/INTELLECT-1-Instruct")
|
| 68 |
+
|
| 69 |
+
input_text = "What is the Metamorphosis of Prime Intellect about?"
|
| 70 |
+
input_ids = tokenizer.encode(input_text, return_tensors="pt")
|
| 71 |
+
output_ids = model.generate(input_ids, max_length=50, num_return_sequences=1)
|
| 72 |
+
output_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
|
| 73 |
+
|
| 74 |
+
print(output_text)
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
### Example text generation pipeline
|
| 78 |
+
```python
|
| 79 |
+
import torch
|
| 80 |
+
from transformers import pipeline
|
| 81 |
+
torch.set_default_device("cuda")
|
| 82 |
+
|
| 83 |
+
pipe = pipeline("text-generation", model="PrimeIntellect/INTELLECT-1")
|
| 84 |
+
print(pipe("What is prime intellect ?"))
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
## **Model Details**
|
| 88 |
+
- **Compute Contributors**: Prime Intellect, Arcee AI, kotaro, skre_0, marlo, rodeo, Herb, Olas, superchillen, Hugging Face, mev_pete, 0xfr_, dj, primeprimeint1234, Marco Giglio, realtek, Hyperbolic, hecataeus, NWO, Virtual Machine, droll, SemiAnalysis, _waiting__, toptickcrypto, sto, Johannes, washout_segment_0b, klee
|
| 89 |
+
- **Release Date**: 29 Nov 2024
|
| 90 |
+
- **Model License**: Apache 2.0
|
| 91 |
+
|
| 92 |
+
## **Technical Specifications**
|
| 93 |
+
| **Parameter** | **Value** |
|
| 94 |
+
|----------------------|------------------------|
|
| 95 |
+
| Parameter Size | 10B |
|
| 96 |
+
| Number of Layers | 42 |
|
| 97 |
+
| Number of Attention Heads | 32 |
|
| 98 |
+
| Hidden Size | 4096 |
|
| 99 |
+
| Context Length | 8192 |
|
| 100 |
+
| Vocabulary Size | 128256 |
|
| 101 |
+
|
| 102 |
+
**Training Details**:
|
| 103 |
+
- **Dataset**: 55% fineweb-edu, 10% fineweb, 20% Stack V1, 10% dclm-baseline, 5% open-web-math
|
| 104 |
+
- **Tokens**: 1 Trillion
|
| 105 |
+
- **Optimizer**: Diloco/LocalSGD - Inner Optimizer: AdamW, Outer Optmizer: Nesterov SGD
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
## Post-training
|
| 110 |
+
|
| 111 |
+
The post-training has been handled by [arcee](https://huggingface.co/arcee-ai)
|
| 112 |
+
|
| 113 |
+
After completing the globally distributed pretraining phase, we applied several post-training techniques to enhance INTELLECT-1's capabilities and task-specific performance. Our post-training methodology consisted of three main phases.
|
| 114 |
+
|
| 115 |
+
First, we conducted an extensive series of 16 Supervised Fine-Tuning (SFT) trainings, with individual runs ranging from 1 to 3.3 billion tokens each. The most successful configuration used 2.4 billion training tokens over 3 epochs. We used MergeKit, EvolKit, and DistillKit from Arcee AI to combine the models, generate the data sets, and distill the logits, respectively. For training data, we used a diverse set of high-quality datasets:
|
| 116 |
+
|
| 117 |
+
1. **New Datasets** (released with INTELLECT-1):
|
| 118 |
+
- [arcee-ai/EvolKit-75k (generated via EvolKit)](https://huggingface.co/datasets/arcee-ai/EvolKit-75K)
|
| 119 |
+
- [arcee-ai/Llama-405B-Logits](https://huggingface.co/datasets/arcee-ai/LLama-405B-Logits)
|
| 120 |
+
- arcee-ai/The-Tomb
|
| 121 |
+
|
| 122 |
+
2. **Instruction Following**:
|
| 123 |
+
- [mlabonne/open-perfectblend-fixed](https://huggingface.co/datasets/MaziyarPanahi/open-perfectblend-fixed) (generalist capabilities)
|
| 124 |
+
- [microsoft/orca-agentinstruct-1M-v1-cleaned](https://huggingface.co/datasets/mlabonne/orca-agentinstruct-1M-v1-cleaned) (Chain-of-Thought)
|
| 125 |
+
- [Post-training-Data-Flywheel/AutoIF-instruct-61k-with-funcs](https://huggingface.co/datasets/Post-training-Data-Flywheel/AutoIF-instruct-61k)
|
| 126 |
+
|
| 127 |
+
3. **Domain-Specific**:
|
| 128 |
+
- [Team-ACE/ToolACE](https://huggingface.co/datasets/Team-ACE/ToolACE) (function calling)
|
| 129 |
+
- [Synthia coder](https://huggingface.co/datasets/MaziyarPanahi/Synthia-Coder-v1.5-I-sharegpt) (programming)
|
| 130 |
+
- [ServiceNow-AI/M2Lingual](https://huggingface.co/datasets/ServiceNow-AI/M2Lingual) (multilingual)
|
| 131 |
+
- [AI-MO/NuminaMath-TIR](https://huggingface.co/datasets/AI-MO/NuminaMath-TIR) (mathematics)
|
| 132 |
+
|
| 133 |
+
4. **Tulu-3 Persona Datasets**:
|
| 134 |
+
- [allenai/tulu-3-sft-personas-code](https://huggingface.co/datasets/allenai/tulu-3-sft-personas-code)
|
| 135 |
+
- [allenai/tulu-3-sft-personas-math](https://huggingface.co/datasets/allenai/tulu-3-sft-personas-math)
|
| 136 |
+
- [allenai/tulu-3-sft-personas-math-grade](https://huggingface.co/datasets/allenai/tulu-3-sft-personas-math-grade)
|
| 137 |
+
- [allenai/tulu-3-sft-personas-algebra](https://huggingface.co/datasets/allenai/tulu-3-sft-personas-algebra)
|
| 138 |
+
|
| 139 |
+
Second, we execute 8 distinct Direct Preference Optimization (DPO) runs with various combinations of data sets to enhance specific performance metrics and align the model with human preferences. A key advantage in our post-training process was INTELLECT-1's use of the Llama-3 tokenizer, which allowed us to utilize logits from Llama-3.1-405B to heal and maintain precision during the post-training process via DistillKit.
|
| 140 |
+
|
| 141 |
+
Finally, we performed 16 strategic merges between candidate models using MergeKit to create superior combined models that leverage the strengths of different training runs. During the post-training phase, we observed that when using a ChatML template without an explicit BOS (begin-of-sequence) token, the initial loss was approximately 15. However, when switching to the Llama 3.1 chat template, the loss for these trainings started much lower at approximately 1.1, indicating better alignment with the underlying Llama 3 tokenizer.
|
| 142 |
+
|
| 143 |
+
The combination of these post-training techniques resulted in significant improvements in various benchmarks, particularly in knowledge retrieval, grade school math, instruction following and reasoning.
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
**Performance on benchmarks**
|
| 147 |
+
|
| 148 |
+
| Model | Size | Tokens | MMLU | GPQA | GSM8K | ARC-C | Hellaswag |
|
| 149 |
+
|---|---|---|---|---|---|---|---|
|
| 150 |
+
| INTELLECT-Instruct | 10B | 1T | 49.89 | 28.32 | 38.58 | 54.52 | 71.42 |
|
| 151 |
+
| MPT-7B-Chat | 7B | 1T | 36.29 | 26.79 | 8.26 | 51.02 | 75.88 |
|
| 152 |
+
| Falcon-7B-Instruct | 7B | 1.5T | 25.21 | 26.34 | 4.93 | 45.82 | 70.61 |
|
| 153 |
+
| LLM360-AmberChat | 7B | 1.4T | 36.02 | 27.23 | 6.14 | 43.94 | 73.94 |
|
| 154 |
+
| LLaMA2-7B-Chat | 7B | 2T | 47.20 | 28.57 | 23.96 | 53.33 | 78.69 |
|
| 155 |
+
| LLaMA2-13B-Chat | 13B | 2T | 53.51 | 28.35 | 37.15 | 59.73 | 82.47 |
|
| 156 |
+
|
| 157 |
+
|
| 158 |
+
## **Citations**
|
| 159 |
+
If you use this model in your research, please cite it as follows:
|
| 160 |
+
```
|
| 161 |
+
@article{jaghouar2024intellect,
|
| 162 |
+
title={INTELLECT-1 Technical Report.},
|
| 163 |
+
author={Jaghouar, Sami and Ong, Jack Min and Basra, Manveer and Obeid, Fares and Straube, Jannik and Keiblinger, Michael and Bakouch, Elie and Atkins, Lucas and Panahi, Maziyar and Goddard, Charles and Ryabinin, Max and Hagemann, Johannes},
|
| 164 |
+
journal={arXiv preprint},
|
| 165 |
+
year={2024}
|
| 166 |
+
}
|
| 167 |
+
```
|