Instructions to use QuantLLM/SmolLM2-135M-QuantLLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantLLM/SmolLM2-135M-QuantLLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantLLM/SmolLM2-135M-QuantLLM", device_map="auto")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("QuantLLM/SmolLM2-135M-QuantLLM") model = AutoModelForCausalLM.from_pretrained("QuantLLM/SmolLM2-135M-QuantLLM", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use QuantLLM/SmolLM2-135M-QuantLLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantLLM/SmolLM2-135M-QuantLLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantLLM/SmolLM2-135M-QuantLLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/QuantLLM/SmolLM2-135M-QuantLLM
- SGLang
How to use QuantLLM/SmolLM2-135M-QuantLLM 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 "QuantLLM/SmolLM2-135M-QuantLLM" \ --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": "QuantLLM/SmolLM2-135M-QuantLLM", "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 "QuantLLM/SmolLM2-135M-QuantLLM" \ --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": "QuantLLM/SmolLM2-135M-QuantLLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use QuantLLM/SmolLM2-135M-QuantLLM with Docker Model Runner:
docker model run hf.co/QuantLLM/SmolLM2-135M-QuantLLM
Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: HuggingFaceTB/SmolLM2-135M
|
| 4 |
+
library_name: transformers
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- quantllm
|
| 9 |
+
- transformers
|
| 10 |
+
- safetensors
|
| 11 |
+
pipeline_tag: text-generation
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
<div align="center">
|
| 15 |
+
|
| 16 |
+
# π€ SmolLM2-135M-QuantLLM
|
| 17 |
+
|
| 18 |
+
**HuggingFaceTB/SmolLM2-135M** converted to **SAFETENSORS** format
|
| 19 |
+
|
| 20 |
+
[](https://github.com/codewithdark-git/QuantLLM)
|
| 21 |
+
[]()
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
<a href="https://github.com/codewithdark-git/QuantLLM">β Star QuantLLM on GitHub</a>
|
| 25 |
+
|
| 26 |
+
</div>
|
| 27 |
+
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
## π About This Model
|
| 32 |
+
|
| 33 |
+
This model is **[HuggingFaceTB/SmolLM2-135M](https://huggingface.co/HuggingFaceTB/SmolLM2-135M)** converted to **SafeTensors** format for use with HuggingFace Transformers and PyTorch.
|
| 34 |
+
|
| 35 |
+
| Property | Value |
|
| 36 |
+
|----------|-------|
|
| 37 |
+
| **Base Model** | [HuggingFaceTB/SmolLM2-135M](https://huggingface.co/HuggingFaceTB/SmolLM2-135M) |
|
| 38 |
+
| **Format** | SAFETENSORS |
|
| 39 |
+
| **Quantization** | None (Full Precision) |
|
| 40 |
+
| **License** | apache-2.0 |
|
| 41 |
+
| **Created With** | [QuantLLM](https://github.com/codewithdark-git/QuantLLM) |
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
## π Quick Start
|
| 45 |
+
|
| 46 |
+
### With Transformers
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 50 |
+
|
| 51 |
+
# Load model and tokenizer
|
| 52 |
+
model = AutoModelForCausalLM.from_pretrained("codewithdark/SmolLM2-135M-QuantLLM")
|
| 53 |
+
tokenizer = AutoTokenizer.from_pretrained("codewithdark/SmolLM2-135M-QuantLLM")
|
| 54 |
+
|
| 55 |
+
# Generate text
|
| 56 |
+
inputs = tokenizer("Once upon a time", return_tensors="pt")
|
| 57 |
+
outputs = model.generate(**inputs, max_new_tokens=100, do_sample=True)
|
| 58 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
### With QuantLLM
|
| 62 |
+
|
| 63 |
+
```python
|
| 64 |
+
from quantllm import TurboModel
|
| 65 |
+
|
| 66 |
+
# Load with automatic optimization
|
| 67 |
+
model = TurboModel.from_pretrained("codewithdark/SmolLM2-135M-QuantLLM")
|
| 68 |
+
|
| 69 |
+
# Generate
|
| 70 |
+
response = model.generate("Write a poem about coding")
|
| 71 |
+
print(response)
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
### Requirements
|
| 75 |
+
|
| 76 |
+
```bash
|
| 77 |
+
pip install transformers torch
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
## π Model Details
|
| 82 |
+
|
| 83 |
+
| Property | Value |
|
| 84 |
+
|----------|-------|
|
| 85 |
+
| **Original Model** | [HuggingFaceTB/SmolLM2-135M](https://huggingface.co/HuggingFaceTB/SmolLM2-135M) |
|
| 86 |
+
| **Format** | SAFETENSORS |
|
| 87 |
+
| **Quantization** | Full Precision |
|
| 88 |
+
| **License** | `apache-2.0` |
|
| 89 |
+
| **Export Date** | 2026-04-29 |
|
| 90 |
+
| **Exported By** | [QuantLLM v2.1](https://github.com/codewithdark-git/QuantLLM) |
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
---
|
| 95 |
+
|
| 96 |
+
## π Created with QuantLLM
|
| 97 |
+
|
| 98 |
+
<div align="center">
|
| 99 |
+
|
| 100 |
+
[](https://github.com/codewithdark-git/QuantLLM)
|
| 101 |
+
|
| 102 |
+
**Convert any model to GGUF, ONNX, or MLX in one line!**
|
| 103 |
+
|
| 104 |
+
```python
|
| 105 |
+
from quantllm import turbo
|
| 106 |
+
|
| 107 |
+
# Load any HuggingFace model
|
| 108 |
+
model = turbo("HuggingFaceTB/SmolLM2-135M")
|
| 109 |
+
|
| 110 |
+
# Export to any format
|
| 111 |
+
model.export("safetensors", quantization="Q4_K_M")
|
| 112 |
+
|
| 113 |
+
# Push to HuggingFace
|
| 114 |
+
model.push("your-repo", format="safetensors")
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
<a href="https://github.com/codewithdark-git/QuantLLM">
|
| 118 |
+
<img src="https://img.shields.io/github/stars/codewithdark-git/QuantLLM?style=social" alt="GitHub Stars">
|
| 119 |
+
</a>
|
| 120 |
+
|
| 121 |
+
**[π Documentation](https://github.com/codewithdark-git/QuantLLM#readme)** Β·
|
| 122 |
+
**[π Report Issue](https://github.com/codewithdark-git/QuantLLM/issues)** Β·
|
| 123 |
+
**[π‘ Request Feature](https://github.com/codewithdark-git/QuantLLM/issues)**
|
| 124 |
+
|
| 125 |
+
</div>
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
## π Export Details
|
| 129 |
+
|
| 130 |
+
Exported with [QuantLLM](https://github.com/codewithdark-git/QuantLLM) from `HuggingFaceTB/SmolLM2-135M` (134.5M params).
|
| 131 |
+
|
| 132 |
+
| Property | Value |
|
| 133 |
+
|----------|-------|
|
| 134 |
+
| **Format** | SafeTensors |
|
| 135 |
+
| **Size** | 541.6 MB |
|
| 136 |
+
| **Parameters** | 134.5M |
|
| 137 |
+
| **Dtype** | float32 |
|
| 138 |
+
|
| 139 |
+
### How to use
|
| 140 |
+
|
| 141 |
+
|