File size: 3,942 Bytes
8deb4b3 616e513 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
---
license: apache-2.0
language:
- en
base_model:
- HuggingFaceTB/SmolLM2-135M-Instruct
pipeline_tag: text-generation
tags:
- gguf
- q8_0
- quantized
- llama
- llama.cpp
- smollm2
- embedded-ai
- lightweight
- fast-inference
- efficient
- tiny-llm
---
# SmolLM2 135M Instruct (Quantized Q8_0, GGUF)
A tiny yet powerful instruction-tuned language model optimized for CPU inference. With only 135 million parameters and a file size of 138 MB, this model delivers impressive performance even on modest hardware.
## π Key Features
- **Tiny Footprint**: Only 138 MB in size
- **CPU-Friendly**: Runs efficiently without a GPU
- **Low Resource Requirements**: Works on systems with just 1-2 GB RAM
- **Fast Inference**: Responsive even on older CPUs
- **Instruction-Tuned**: Optimized for chat and instruction-following tasks
- **Long Context**: Supports up to 8,192 tokens
## π¦ Model Details
- **Architecture**: LLaMA-like transformer
- **Parameters**: 135M
- **Format**: GGUF (compatible with llama.cpp ecosystem)
- **Quantization**: Q8_0 (8-bit linear quantization)
- **Type**: Instruction-tuned chat model
## ποΈ Repository Contents
- `smollm2-135m-instruct-q8_0.gguf` - Main model file (Q8_0 quantized)
- `tokenizer.json` - Model tokenizer file
- `config.json` - HuggingFace compatibility configuration
- `LICENSE` - Apache 2.0 license file
- `README.md` - This documentation
## π Quick Start Guide
### Prerequisites
```bash
# Install llama-cpp-python
pip install llama-cpp-python
```
### Using llama.cpp CLI
```bash
# Basic usage
./main -m smollm2-135m-instruct-q8_0.gguf -p "Who are you?"
# With custom parameters
./main -m smollm2-135m-instruct-q8_0.gguf --ctx-size 2048 --threads 4 -p "Write a story."
```
### Using Python with llama-cpp-python
```python
from llama_cpp import Llama
# Initialize the model
llm = Llama(
model_path="smollm2-135m-instruct-q8_0.gguf",
n_ctx=2048, # Context window
n_threads=4, # CPU threads to use
n_batch=512 # Batch size for prompt processing
)
# Generate a response
output = llm("What is the capital of France?",
max_tokens=128,
temperature=0.7,
top_p=0.95)
print(output)
```
## π¬ Prompt Format
This is a chat-style instruction-tuned model. Use the following message format for best results:
```json
[
{"role": "system", "content": "You are a helpful AI assistant."},
{"role": "user", "content": "Tell me a joke."}
]
```
### Example Interaction
```
User: What is your name?
Luna: My name is Luna, and I'm your tiny but capable AI assistant, ready to help with anything you need!
```
## π§ Compatible Software
- llama.cpp
- text-generation-webui
- LM Studio
- KoboldCPP
- llama-cpp-python
## πͺ Why Choose This Model?
- β¨ **Runs Offline**: No internet connection needed
- π± **Tiny Footprint**: Just 138 MB on disk
- β‘ **Fast Inference**: Optimized for CPU performance
- π **Open Source**: Apache 2.0 licensed
- π οΈ **Versatile**: Perfect for edge devices, embedded systems, hobby projects, and learning
## π₯² Limitations
SmolLM2 models primarily understand and generate content in English. They can produce text on a variety of topics, but the generated content may not always be factually accurate, logically consistent, or free from biases present in the training data. These models should be used as assistive tools rather than definitive sources of information. Users should always verify important information and critically evaluate any generated content.
## π License
[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
## π Credits
- Quantized and packaged by Ayush Swami (HackNetAyush)
- Based on HuggingFaceTB's SmolLM2-135M-Instruct model
## π» Hardware Requirements
- CPU: Any modern CPU
- RAM: 1-2 GB minimum
- GPU: Not required
- Disk Space: ~140 MB
Feel free to Like β€οΈ the repository if you find this model useful! |