| | --- |
| | language: |
| | - en |
| | tags: |
| | - llama |
| | - causal-lm |
| | - digit-recognition |
| | - sparse-model |
| | - sparsegpt |
| | - model-compression |
| | - 50-percent-sparse |
| | license: apache-2.0 |
| | base_model: junzzhu/atomllama-33K-5x5-DigitMesh |
| | library_name: transformers |
| | pipeline_tag: text-generation |
| | --- |
| | |
| | # AtomLlama-33K-5x5-DigitMesh-Sparse |
| |
|
| | A 50% sparse version of [atomllama-33K-5x5-DigitMesh](https://huggingface.co/junzzhu/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](https://huggingface.co/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 |
| |
|
| | ```bash |
| | python -m vllm.entrypoints.openai.api_server \ |
| | --model junzzhu/atomllama-33K-5x5-DigitMesh-sparse \ |
| | --max-model-len 32 |
| | ``` |
| |
|
| | ### Example Inference |
| |
|
| | ```bash |
| | 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 |
| |
|
| | ```bibtex |
| | @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}} |
| | } |