# Needle 2 Minimum System Requirements: What You Need to Run This 45M-Parameter Model

> Discover Needle 2 minimum system requirements. Run this 45M-parameter model with Python 3.9+, 28MB RAM, and 14MB storage. No GPU needed for inference.

- Repository: [Cactus Compute, Inc./needle](https://github.com/cactus-compute/needle)
- Tags: getting-started
- Published: 2026-08-23

---

**Needle 2 requires only Python 3.9+, 28 MiB of RAM, and 14 MiB of storage, with no GPU mandatory for inference.**

Needle 2 from [cactus-compute/needle](https://github.com/cactus-compute/needle) is a **tiny, self-contained 45 million-parameter language model** designed to run on virtually any modern computer. Unlike larger AI frameworks that demand high-end hardware, Needle 2 prioritizes minimal resource consumption while still supporting tool-calling, structured extraction, and optional fine-tuning with hardware acceleration.

## Core Hardware and Software Requirements

### Python Version

The package requires **Python 3.9 or newer**, as specified in the [`pyproject.toml`](https://github.com/cactus-compute/needle/blob/main/pyproject.toml) build configuration. Needle 2 is published on PyPI as `cactus-needle` and installs cleanly via standard `pip`.

```bash
pip install cactus-needle

```

### Memory Requirements

For a **full inference session**, Needle 2 consumes approximately **28 MiB of RAM**. The inference engine binary itself weighs only **~14 MiB**, making it one of the smallest production-ready language models available.

The engine file downloads automatically from Hugging Face on first use and caches locally, so subsequent runs start instantly without redownloading.

### Storage Footprint

| Component | Size |
|-----------|------|
| Inference engine binary | 14 MiB |
| Cached weights (auto-downloaded) | Included in above |
| Total disk usage | ~14 MiB + minimal Python dependencies |

### CPU and Operating System

Needle 2 **runs on any CPU** with no external runtime dependencies. It works across:

- Linux
- macOS
- Windows (any platform supported by Python)

The implementation in [`needle/model/run.py`](https://github.com/cactus-compute/needle/blob/main/needle/model/run.py) handles inference directly without requiring containerization or specialized system libraries.

## Optional Accelerator Support

While CPU-only inference is the default, you can install **optional extras** for faster training and inference:

| Platform | Installation Command | Use Case |
|----------|---------------------|----------|
| NVIDIA GPU | `pip install "cactus-needle[gpu]"` | CUDA-enabled acceleration |
| Apple Silicon | `pip install "cactus-needle[metal]"` | Metal Performance Shaders for M-series chips |

These extras are documented in [`doc/finetuning.md`](https://github.com/cactus-compute/needle/blob/main/doc/finetuning.md) and only relevant if you're running **LoRA fine-tuning** or latency-sensitive production workloads. Standard inference requires none of them.

## Dependency Profile

The base package pulls in a minimal set of pure-Python dependencies automatically via [`requirements.txt`](https://github.com/cactus-compute/needle/blob/main/requirements.txt):

- `pydantic` — for structured data validation
- `numpy` — for numerical operations
- `jax` — for optional training workflows

All dependencies install automatically; no manual environment management is required.

## Quick Verification

After installation, verify your environment can run Needle 2 with this minimal example from [`needle/__init__.py`](https://github.com/cactus-compute/needle/blob/main/needle/__init__.py):

```python
import needle

@needle.tool
def get_weather(city: str):
    """Get the current weather for a city."""
    return {"city": city, "temp_c": 27, "sky": "clear"}

agent = needle.Needle(tools=[get_weather])
print(agent.run("What's the weather like in Lagos?")["results"])

```

If this executes without errors, your system meets all requirements.

## Structured Extraction Example

Needle 2's tiny footprint makes it ideal for **data extraction pipelines** on resource-constrained environments:

```python
from pydantic import BaseModel
import needle

class Invoice(BaseModel):
    vendor: str
    total: float
    due_date: str

text = "Invoice from Acme Corp, $1,200.00, due 2026-09-01"
invoice = needle.extract(text, Invoice)
print(invoice.vendor, invoice.total)  # → Acme Corp 1200.0

```

## Summary

- **Python 3.9+** is the only hard software requirement
- **28 MiB RAM** and **14 MiB storage** handle complete inference sessions
- **Any CPU** suffices; no GPU or specialized hardware mandatory
- **GPU/Metal extras** available for optional acceleration during training
- **Cross-platform**: Linux, macOS, and Windows supported equally

## Frequently Asked Questions

### Can Needle 2 run on a Raspberry Pi or other edge device?

Yes. With only 28 MiB RAM required and no GPU dependency, Needle 2 runs comfortably on Raspberry Pi 4 and comparable ARM-based edge devices. The pure-Python dependencies compile without issues on ARM architectures.

### Does Needle 2 require internet access after installation?

Only for the initial download of the 14 MiB engine file from Hugging Face. The implementation caches this binary locally, so subsequent runs work entirely offline. The cache location follows standard platform conventions.

### How much faster is GPU acceleration for inference?

The GPU and Metal extras primarily accelerate **LoRA fine-tuning** workflows documented in [`doc/finetuning.md`](https://github.com/cactus-compute/needle/blob/main/doc/finetuning.md). For standard inference, CPU performance is already sufficient given the model's 45M-parameter size. GPU inference shows measurable gains primarily in batched or high-throughput scenarios.

### What happens if I install both GPU and Metal extras?

The package managers handle this cleanly—extras are additive and don't conflict. However, only the hardware matching your system will be utilized. NVIDIA GPUs require the `[gpu]` extra; Apple Silicon Macs require `[metal]`.