Text Generation
Transformers
Safetensors
English
llama
causal-lm
digit-recognition
sparse-model
sparsegpt
model-compression
50-percent-sparse
text-generation-inference
Instructions to use junzzhu/atomllama-33K-5x5-DigitMesh-sparse with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use junzzhu/atomllama-33K-5x5-DigitMesh-sparse with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="junzzhu/atomllama-33K-5x5-DigitMesh-sparse")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("junzzhu/atomllama-33K-5x5-DigitMesh-sparse") model = AutoModelForCausalLM.from_pretrained("junzzhu/atomllama-33K-5x5-DigitMesh-sparse") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use junzzhu/atomllama-33K-5x5-DigitMesh-sparse with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "junzzhu/atomllama-33K-5x5-DigitMesh-sparse" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "junzzhu/atomllama-33K-5x5-DigitMesh-sparse", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/junzzhu/atomllama-33K-5x5-DigitMesh-sparse
- SGLang
How to use junzzhu/atomllama-33K-5x5-DigitMesh-sparse 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 "junzzhu/atomllama-33K-5x5-DigitMesh-sparse" \ --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": "junzzhu/atomllama-33K-5x5-DigitMesh-sparse", "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 "junzzhu/atomllama-33K-5x5-DigitMesh-sparse" \ --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": "junzzhu/atomllama-33K-5x5-DigitMesh-sparse", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use junzzhu/atomllama-33K-5x5-DigitMesh-sparse with Docker Model Runner:
docker model run hf.co/junzzhu/atomllama-33K-5x5-DigitMesh-sparse
AtomLlama-33K-5x5-DigitMesh-Sparse
A 50% sparse version of atomllama-33K-5x5-DigitMesh for efficient 5×5 digit mesh recognition.
Model Description
This is a ~50% unstructured sparse variant of the AtomLlama-33K-5x5-DigitMesh model, pruned using the SparseGPT algorithm. Half of the model weights have been set to zero while maintaining digit recognition accuracy through second-order optimization.
Key Features
- Base Model: junzzhu/atomllama-33K-5x5-DigitMesh
- Sparsity: ~50% (unstructured)
- Pruning Method: SparseGPT with Hessian-based importance scoring
- Parameters: ~33K total, ~16.5K non-zero
- Architecture: LlamaForCausalLM
- Task: 5×5 binary digit mesh recognition
Usage
Serving with vLLM
python -m vllm.entrypoints.openai.api_server \
--model junzzhu/atomllama-33K-5x5-DigitMesh-sparse \
--max-model-len 32
Example Inference
curl http://localhost:8000/v1/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "junzzhu/atomllama-33K-5x5-DigitMesh-sparse",
"prompt": "1 1 1 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 <SEP>",
"max_tokens": 1,
"temperature": 0
}'
Expected output: D0
Sparsity Details
- Type: Unstructured (weights pruned individually based on importance)
- Target Sparsity: 50%
- Calibration: Pruned using digit pattern activations
- Benefits: Reduced memory footprint and potential inference speedup with sparse tensor libraries
License
Apache-2.0
Citation
@misc{atomllama-33k-digitMesh-sparse,
title={AtomLlama-33K-5x5-DigitMesh-Sparse: A 50% Sparse Model for Digit Recognition},
author={Jun Zhu},
year={2026},
howpublished={\url{https://huggingface.co/junzzhu/atomllama-33K-5x5-DigitMesh-sparse}}
}
- Downloads last month
- 2