Text Generation
Transformers
Safetensors
English
llama
small
cpu
supra
v2
tiny
mini
open
open-source
text-generation-inference
Instructions to use SupraLabs/Supra-Mini-v2-0.1M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SupraLabs/Supra-Mini-v2-0.1M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SupraLabs/Supra-Mini-v2-0.1M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SupraLabs/Supra-Mini-v2-0.1M") model = AutoModelForCausalLM.from_pretrained("SupraLabs/Supra-Mini-v2-0.1M") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use SupraLabs/Supra-Mini-v2-0.1M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SupraLabs/Supra-Mini-v2-0.1M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SupraLabs/Supra-Mini-v2-0.1M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SupraLabs/Supra-Mini-v2-0.1M
- SGLang
How to use SupraLabs/Supra-Mini-v2-0.1M 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 "SupraLabs/Supra-Mini-v2-0.1M" \ --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": "SupraLabs/Supra-Mini-v2-0.1M", "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 "SupraLabs/Supra-Mini-v2-0.1M" \ --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": "SupraLabs/Supra-Mini-v2-0.1M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SupraLabs/Supra-Mini-v2-0.1M with Docker Model Runner:
docker model run hf.co/SupraLabs/Supra-Mini-v2-0.1M
Update README.md
Browse files
README.md
CHANGED
|
@@ -19,7 +19,7 @@ new_version: SupraLabs/Supra-Mini-v4-2M
|
|
| 19 |
---
|
| 20 |
|
| 21 |
# 🦅 Supra Mini v2 0.1M
|
| 22 |
-
Supra Mini **v2** 0.1M is a very
|
| 23 |
|
| 24 |
## Model Config
|
| 25 |
|
|
@@ -35,7 +35,7 @@ Supra Mini **v2** 0.1M is a very tiny base model trained on 700 million tokens o
|
|
| 35 |
- Weight Decay: 0.01
|
| 36 |
|
| 37 |
## Final Loss
|
| 38 |
-
This model reached a final train loss
|
| 39 |
|
| 40 |
## Benchmarks
|
| 41 |
|
|
@@ -97,6 +97,18 @@ print("-" * 30)
|
|
| 97 |
print("\nOutput:\n" + generate_text(test_prompt))
|
| 98 |
```
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
## Training guide
|
| 101 |
We trained Supra Mini v2 0.1M on a single T4 GPU in ~2 hours for 3 epochs.<br>
|
| 102 |
The full training code can be found in this repo as `run.sh` (easily run the complete pipeline), `train_tokenizer.py` (train costum BPE tokenizer with vocab size of 2048), `train.py` (train the model) and `inference.py` (test the model).<br>
|
|
|
|
| 19 |
---
|
| 20 |
|
| 21 |
# 🦅 Supra Mini v2 0.1M
|
| 22 |
+
Supra Mini **v2** 0.1M is a very, and we mean very small base model trained on 700 million tokens of Fineweb-Edu for 3 epochs as the **second version** of our Supra Mini series.
|
| 23 |
|
| 24 |
## Model Config
|
| 25 |
|
|
|
|
| 35 |
- Weight Decay: 0.01
|
| 36 |
|
| 37 |
## Final Loss
|
| 38 |
+
This model reached a final train loss of **4.413**.
|
| 39 |
|
| 40 |
## Benchmarks
|
| 41 |
|
|
|
|
| 97 |
print("\nOutput:\n" + generate_text(test_prompt))
|
| 98 |
```
|
| 99 |
|
| 100 |
+
## Use cases
|
| 101 |
+
|
| 102 |
+
1. Educational research
|
| 103 |
+
2. deployment or testing/fine-tuning on edge environments
|
| 104 |
+
3. Or more simply, for fun
|
| 105 |
+
|
| 106 |
+
## Limitations
|
| 107 |
+
|
| 108 |
+
1. Cannot reason, chat, or code
|
| 109 |
+
2. Incoherent more often than not
|
| 110 |
+
3. Mostly unfactual
|
| 111 |
+
|
| 112 |
## Training guide
|
| 113 |
We trained Supra Mini v2 0.1M on a single T4 GPU in ~2 hours for 3 epochs.<br>
|
| 114 |
The full training code can be found in this repo as `run.sh` (easily run the complete pipeline), `train_tokenizer.py` (train costum BPE tokenizer with vocab size of 2048), `train.py` (train the model) and `inference.py` (test the model).<br>
|