Instructions to use SupraLabs/Supra-50M-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SupraLabs/Supra-50M-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SupraLabs/Supra-50M-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SupraLabs/Supra-50M-Instruct") model = AutoModelForCausalLM.from_pretrained("SupraLabs/Supra-50M-Instruct") - llama-cpp-python
How to use SupraLabs/Supra-50M-Instruct with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="SupraLabs/Supra-50M-Instruct", filename="supra-50m-instruct-f16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use SupraLabs/Supra-50M-Instruct with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf SupraLabs/Supra-50M-Instruct:F16 # Run inference directly in the terminal: llama-cli -hf SupraLabs/Supra-50M-Instruct:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf SupraLabs/Supra-50M-Instruct:F16 # Run inference directly in the terminal: llama-cli -hf SupraLabs/Supra-50M-Instruct:F16
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 SupraLabs/Supra-50M-Instruct:F16 # Run inference directly in the terminal: ./llama-cli -hf SupraLabs/Supra-50M-Instruct:F16
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 SupraLabs/Supra-50M-Instruct:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf SupraLabs/Supra-50M-Instruct:F16
Use Docker
docker model run hf.co/SupraLabs/Supra-50M-Instruct:F16
- LM Studio
- Jan
- vLLM
How to use SupraLabs/Supra-50M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SupraLabs/Supra-50M-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SupraLabs/Supra-50M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SupraLabs/Supra-50M-Instruct:F16
- SGLang
How to use SupraLabs/Supra-50M-Instruct 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-50M-Instruct" \ --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": "SupraLabs/Supra-50M-Instruct", "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 "SupraLabs/Supra-50M-Instruct" \ --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": "SupraLabs/Supra-50M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use SupraLabs/Supra-50M-Instruct with Ollama:
ollama run hf.co/SupraLabs/Supra-50M-Instruct:F16
- Unsloth Studio new
How to use SupraLabs/Supra-50M-Instruct 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 SupraLabs/Supra-50M-Instruct 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 SupraLabs/Supra-50M-Instruct to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for SupraLabs/Supra-50M-Instruct to start chatting
- Docker Model Runner
How to use SupraLabs/Supra-50M-Instruct with Docker Model Runner:
docker model run hf.co/SupraLabs/Supra-50M-Instruct:F16
- Lemonade
How to use SupraLabs/Supra-50M-Instruct with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SupraLabs/Supra-50M-Instruct:F16
Run and chat with the model
lemonade run user.Supra-50M-Instruct-F16
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)🦅 Supra-50M Instruct
Supra-50M Instruct is a compact 50M-parameter chat/instruct causal language model built by SupraLabs, trained from scratch using a Llama-style architecture on 20 billion tokens of high-quality educational web text. Despite being significantly smaller than comparable open models, it achieves competitive or superior results on several key benchmarks. It's our first SupraLabs Scaling Up Plan model.
📚 Training Data
For the SFT (supervised finetuning) we used the full Alpaca-Cleaned dataset for 4 epochs. See the full SFT-code in sft.py
⚙️ Pretraining details
For more details, the full code, configs and weights, please refer to https://huggingface.co/SupraLabs/Supra-50M-Base
🚀 Inference
import os
import warnings
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
warnings.filterwarnings("ignore", category=UserWarning, module="transformers")
import torch
from transformers import pipeline, AutoTokenizer, logging
logging.set_verbosity_error()
# ── Config ────────────────────────────────────────────────────────────────────
MODEL_ID = "SupraLabs/Supra-50M-Instruct"
MAX_NEW_TOKENS = 512
# ── Load pipeline directly from HF ────────────────────────────────────────────
print(f"[*] Loading SFT model and tokenizer from HF Hub ({MODEL_ID})...")
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, clean_up_tokenization_spaces=False)
pipe = pipeline(
"text-generation",
model=MODEL_ID,
tokenizer=tokenizer,
device_map="auto",
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32
)
print(f"[+] Pipeline ready — Model loaded using {pipe.model.device}")
# ── Prompt template (must match sft.py exactly) ───────────────────────────────
def build_prompt(instruction: str, input_text: str = "") -> str:
if input_text.strip():
return (
"Below is an instruction that describes a task, paired with an input "
"that provides further context. Write a response that appropriately "
"completes the request.\n\n"
f"### Instruction:\n{instruction}\n\n"
f"### Input:\n{input_text}\n\n"
"### Response:\n"
)
return (
"Below is an instruction that describes a task. Write a response that "
"appropriately completes the request.\n\n"
f"### Instruction:\n{instruction}\n\n"
"### Response:\n"
)
# ── Generate ──────────────────────────────────────────────────────────────────
def generate(instruction: str, input_text: str = "", max_new_tokens: int = MAX_NEW_TOKENS) -> str:
prompt = build_prompt(instruction, input_text)
result = pipe(
prompt,
max_new_tokens=max_new_tokens,
do_sample=True,
temperature=0.7,
top_k=50,
top_p=0.9,
repetition_penalty=1.15,
pad_token_id=pipe.tokenizer.pad_token_id,
eos_token_id=pipe.tokenizer.eos_token_id,
return_full_text=False,
generation_config=None
)
# ── Interactive loop ──────────────────────────────────────────────────────────
if __name__ == "__main__":
print("\n[+] Ready. Type 'quit' to exit.\n")
while True:
instruction = input("Instruction: ").strip()
if instruction.lower() == "quit":
break
inp = input("Input (optional, Enter to skip): ").strip()
print("-" * 50)
print(generate(instruction, inp))
print()
💬 Sample Outputs
**This outputs was generated with this samplings:
temperature=0.7
top_k=50
top_p=0.9
repetition_penalty=1.15**
(The model still hallucinates, but can respond a big quantity of questions correctly)
User: What is AI?
Supra-50M Instruct::
AI refers to the simulation of human intelligence and creativity in machines, which are designed to mimic or surpass human cognition and reasoning. It is the process by which AI systems can solve problems, make predictions, or automate processes that typically require human-level thinking and problem solving. AI technology has been rapidly growing and evolving over time, with many potential benefits for society as a whole. Some of these include:
- Improved Accuracy: AI algorithms have demonstrated great accuracy in predicting outcomes, making accurate predictions on new data sets, and even answering real-world questions. This improves our ability to learn from experience and adapt to changing situations.
- Personalization: AI is used to personalize user experiences, such as recommending products based on their previous interactions and preferences. This helps people to stay motivated and maintain high levels of satisfaction.
- Better Decision Making: AI enables systems to analyze large amounts of data quickly and accurately, allowing us to make informed decisions more easily and
User: What is the capital of Japan?
Supra-50M Instruct::
The capital of Japan is Tokyo.
User: Hi!
Supra-50M Instruct::
Hello! How can i help you today?
User: What is the capital of United States?
Supra-50M Instruct::
The capital of United States is New York City.
User: What is the capital of Russia?
Supra-50M Instruct::
The capital of Russia is Moscow.
📄 License
This model is released under the Apache 2.0 License.
© SupraLabs 2026 — Project Chimera
- Downloads last month
- 537
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="SupraLabs/Supra-50M-Instruct", filename="supra-50m-instruct-f16.gguf", )