Text Generation
Transformers
Safetensors
English
llama
small
cpu
supra
v4
tiny
mini
open
open-source
text-generation-inference
Instructions to use SupraLabs/Supra-Mini-v4-2M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SupraLabs/Supra-Mini-v4-2M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SupraLabs/Supra-Mini-v4-2M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SupraLabs/Supra-Mini-v4-2M") model = AutoModelForCausalLM.from_pretrained("SupraLabs/Supra-Mini-v4-2M") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use SupraLabs/Supra-Mini-v4-2M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SupraLabs/Supra-Mini-v4-2M" # 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-v4-2M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SupraLabs/Supra-Mini-v4-2M
- SGLang
How to use SupraLabs/Supra-Mini-v4-2M 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-v4-2M" \ --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-v4-2M", "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-v4-2M" \ --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-v4-2M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SupraLabs/Supra-Mini-v4-2M with Docker Model Runner:
docker model run hf.co/SupraLabs/Supra-Mini-v4-2M
Upload 6 files
Browse files- config.json +1 -1
- model.safetensors +2 -2
- tokenizer.json +0 -0
- tokenizer_config.json +1 -2
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -29,4 +29,4 @@
|
|
| 29 |
"transformers_version": "5.8.1",
|
| 30 |
"use_cache": false,
|
| 31 |
"vocab_size": 8192
|
| 32 |
-
}
|
|
|
|
| 29 |
"transformers_version": "5.8.1",
|
| 30 |
"use_cache": false,
|
| 31 |
"vocab_size": 8192
|
| 32 |
+
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b24ca24d5b542507b140b5163ae086ac3ebc77dd962ac6e7a1c983251977b297
|
| 3 |
+
size 10498408
|
tokenizer.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
CHANGED
|
@@ -2,9 +2,8 @@
|
|
| 2 |
"backend": "tokenizers",
|
| 3 |
"bos_token": "<s>",
|
| 4 |
"eos_token": "</s>",
|
| 5 |
-
"model_max_length":
|
| 6 |
"pad_token": "<pad>",
|
| 7 |
"tokenizer_class": "TokenizersBackend",
|
| 8 |
"unk_token": "<unk>"
|
| 9 |
}
|
| 10 |
-
|
|
|
|
| 2 |
"backend": "tokenizers",
|
| 3 |
"bos_token": "<s>",
|
| 4 |
"eos_token": "</s>",
|
| 5 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 6 |
"pad_token": "<pad>",
|
| 7 |
"tokenizer_class": "TokenizersBackend",
|
| 8 |
"unk_token": "<unk>"
|
| 9 |
}
|
|
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5265
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dd1ca032f10c3b5922ca727f4cbba83f3a964903407fa395f58685c0ba96c242
|
| 3 |
size 5265
|