Instructions to use Loom-Labs/Apollo-1-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Loom-Labs/Apollo-1-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Loom-Labs/Apollo-1-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Loom-Labs/Apollo-1-4B") model = AutoModelForCausalLM.from_pretrained("Loom-Labs/Apollo-1-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Loom-Labs/Apollo-1-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Loom-Labs/Apollo-1-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Loom-Labs/Apollo-1-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Loom-Labs/Apollo-1-4B
- SGLang
How to use Loom-Labs/Apollo-1-4B 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 "Loom-Labs/Apollo-1-4B" \ --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": "Loom-Labs/Apollo-1-4B", "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 "Loom-Labs/Apollo-1-4B" \ --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": "Loom-Labs/Apollo-1-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use Loom-Labs/Apollo-1-4B 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 Loom-Labs/Apollo-1-4B 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 Loom-Labs/Apollo-1-4B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Loom-Labs/Apollo-1-4B to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Loom-Labs/Apollo-1-4B", max_seq_length=2048, ) - Docker Model Runner
How to use Loom-Labs/Apollo-1-4B with Docker Model Runner:
docker model run hf.co/Loom-Labs/Apollo-1-4B
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Loom-Labs/Apollo-1-4B")
model = AutoModelForCausalLM.from_pretrained("Loom-Labs/Apollo-1-4B")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))Apollo-1-4B
Apollo-1-4B is a 4 billion parameter instruction-tuned model developed by Noema Research.
It is based on Qwen3-4B and optimized for reasoning, instruction following, and lightweight deployment at scale.
This model represents the mid-size member of the Apollo series, balancing performance and efficiency for a broad range of use cases.
Model Overview
- Base model:
Qwen3-4B - Architecture: Decoder-only transformer
- Parameters: ~4B
- Context length: up to 32k tokens (inherits Qwen3 long-context support)
- Domain: General-purpose reasoning and instruction following
- Primary applications:
- Conversational AI
- Multi-step reasoning tasks
- Education and tutoring systems
- Knowledge assistants and prototyping agents
- License: anvdl-1.0
Key Features
- Instruction tuning for consistent conversational and task-oriented responses
- Improved reasoning depth compared to Apollo-1-2B, enabling stronger performance on complex queries
- Long-context handling, inherited from Qwen3 architecture
- Multilingual coverage, retaining broad knowledge across languages
- Balanced resource requirements, deployable on high-end consumer hardware and cloud GPUs
Usage
The model is available in Hugging Face Transformers format. Example:
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "NoemaResearch/Apollo-1-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
messages = [
{"role":"system", "content":"You are Apollo, a helpful reasoning assistant."},
{"role":"user", "content":"Summarize the main differences between reinforcement learning and supervised learning."}
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=768, temperature=0.6, top_p=0.9)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Recommended settings:
temperature=0.4–0.8top_p=0.9–0.95- Lower temperatures yield more factual and concise answers
Evaluation
Apollo-1-4B demonstrates stronger reasoning capabilities relative to Apollo-1-2B, with internal evaluations indicating:
- Higher accuracy on step-by-step reasoning tasks
- More robust instruction adherence
- Reduced hallucinations in factual settings
- Effective balance between performance and efficiency
A full benchmark report will be provided in a future update. For upstream performance details, see the Qwen3-4B model card.
Limitations
- Reasoning scale: While improved, Apollo-1-4B cannot match larger models (14B+) on complex or open-ended tasks
- Knowledge breadth: Some specialized or domain-specific knowledge remains limited
- Hallucinations: May generate plausible but incorrect information
- Prompt sensitivity: Outputs remain dependent on careful prompt formulation
Responsible Use
- Do not rely on Apollo-1-4B for critical decisions without human oversight
- Verify outputs before applying in factual, legal, or safety-critical contexts
- Avoid providing personal or sensitive data in prompts
- The model should not be used to generate unsafe, harmful, or disallowed content
Model Variants
- Full precision (safetensors) — research and high-fidelity inference
- bf16 / fp16 — efficient inference on modern accelerators
- Quantized versions (int8 / int4) — deployment in resource-constrained environments
Citation
If you use this model, please cite both Apollo-1-4B and the Qwen3 base model:
@misc{noema2025apollo4b,
title={Apollo-1-4B},
author={Noema Research},
year={2025},
howpublished={\url{https://huggingface.co/NoemaResearch/Apollo-1-4B}}
}
Acknowledgements
Apollo-1-4B builds upon the Qwen3 family of models. We thank the Qwen team for open-sourcing their models and enabling derivative research.
- Downloads last month
- 18
Model tree for Loom-Labs/Apollo-1-4B
Base model
Qwen/Qwen3-4B-Base
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Loom-Labs/Apollo-1-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)