---
title: How to run the Huginn depth-recurrent model on Apple Silicon
description: "Load the open-weight Huginn recurrent reasoning model on Apple Silicon with Hugging Face Transformers, MPS, trust_remote_code, and num_steps at inference."
image: "https://wavepillars.com/og-image.jpg"
url: "https://wavepillars.com/learn/ai/how-to-run-huginn-model-on-apple-silicon/"
---

You can run **Huginn** (`tomg-group-umd/huginn-0125`), an open-weight depth-recurrent language model, locally on Apple Silicon with Hugging Face Transformers, MPS, and a `num_steps` argument that controls how much recurrent computation the model performs per request.

## Key Takeaways

- Depth-recurrent models reuse one transformer block for multiple passes instead of stacking many fixed layers.
- At inference time, fewer recurrent steps mean faster runs; more steps add computation that can improve reasoning on harder prompts.
- Huginn loads through standard Transformers with `trust_remote_code=True` because the model ships custom implementation code.
- Pin `transformers==4.44.2`, install torch with MPS support, and pass `num_steps` in `generate()` to tune recurrent depth.
- Apple Silicon unified memory makes Macs a practical lab for open-weight experiments without dedicated GPU hardware.
- Huginn is experimental - treat outputs as research exploration, not production baselines.

## What is a depth-recurrent language model?

Most modern LLMs have a fixed number of transformer layers.

For example:

**Input → Layer 1 → Layer 2 → Layer 3 → … → Layer N → Output**

The number of computational steps is essentially fixed by the architecture.

A depth-recurrent model takes a different approach. Instead of having many independent layers, it can **reuse the same computational block multiple times**.

Conceptually:

**Input → Block → Block → Block → … → Block → Output**

The interesting part is that the number of recurrent steps can potentially be changed at inference time.

This creates an interesting trade-off:

* fewer recurrent steps → faster inference
* more recurrent steps → more computation
* more computation can potentially improve reasoning quality

This is particularly interesting for local inference because it provides another way of scaling reasoning without necessarily requiring a much larger parameter count. It sits beside questions of [context window size](/learn/ai/what-is-llm-context-window/) and selective loading - you still respect memory limits, but you gain a dial for compute per token.

## Why Huginn?

Huginn is an open-weight model developed as part of research into recurrent language models.

What makes it interesting is not simply its benchmark performance. It is an example of a different approach to language-model scaling: **reusing model depth to perform additional computation**.

For developers, Huginn is also interesting because it can be experimented with locally.

And Apple Silicon is a surprisingly good platform for this type of experimentation.

## How do you run Huginn on Apple Silicon?

I tested Huginn on an Apple Silicon Mac and found that it can be loaded using the standard Hugging Face Transformers ecosystem.

The basic setup is straightforward.

First, create a Python environment (from your project directory):

```bash
python3.12 -m venv .venv-huginn
source .venv-huginn/bin/activate
python -m pip install --upgrade pip
python -m pip install "transformers==4.44.2" accelerate sentencepiece
python -m pip install torch
```

You can then load the model from Hugging Face.

## What Python code loads Huginn with MPS?

Here is the basic Python structure I use to load and run the model:

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "tomg-group-umd/huginn-0125"
device = "mps"
prompt = "Explain the color of the sun."

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)

model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.float16,
    trust_remote_code=True,     # Allow loading custom code from the model repository
    low_cpu_mem_usage=True,     # Use low CPU memory usage during model loading
)

model = model.to(device)
model.eval()

inputs = tokenizer(
    prompt,
    return_tensors="pt",
    return_token_type_ids=False,
)

inputs = {k: v.to(device) for k, v in inputs.items()}

with torch.no_grad():
    output = model.generate(**inputs, max_new_tokens=128, num_steps=8)

print(tokenizer.decode(output[0], skip_special_tokens=True))
```

There are two important details here: **`trust_remote_code=True`** and **`num_steps=8`**.

Huginn uses custom model code, so the standard Transformers loader needs permission to execute the repository's implementation. The `num_steps` argument controls how many recurrent passes the model runs at inference time - fewer steps for speed, more for additional computation.

Depending on the exact Huginn version and Transformers/PyTorch versions, the loading and generation API may require small adjustments.

## What makes depth recurrence interesting for local AI?

The bigger question is not whether Huginn can replace today's best LLMs.

It probably isn't the right way to look at it.

The interesting question is whether **recurrent computation can become another scaling dimension for language models**.

Today we often think about scaling in terms of:

**more parameters + more tokens + more GPUs**

Depth recurrence introduces another possibility:

**more computation per token**

Instead of making the model physically larger, we can potentially allow it to "think" for more recurrent steps.

For local AI, this could become particularly interesting.

A relatively compact model could potentially perform additional computation when the task requires it, while using fewer steps for simple requests.

## Why is Apple Silicon a good fit?

Apple Silicon provides a convenient environment for experimenting with these ideas because unified memory allows the CPU and GPU to access the same memory pool.

That makes Macs particularly attractive for developers who want to experiment with models that would otherwise require dedicated GPU hardware.

Huginn is still an experimental model, and the ecosystem around recurrent language models is evolving quickly.

But that's exactly what makes it interesting.

We are starting to see open-weight models explore not only **how large a model should be**, but also **how much computation a model should perform to solve a problem**.

And that could become an important direction for the next generation of local AI.

## FAQ

### What is a depth-recurrent language model?

It is an architecture that reuses the same transformer-like block for multiple computational passes instead of stacking a fixed number of independent layers. The recurrent step count can often be adjusted at inference time, trading speed against extra computation per token.

### What is Huginn on Hugging Face?

Huginn (`tomg-group-umd/huginn-0125`) is an open-weight experimental model from recurrent language-model research. You load it with Hugging Face Transformers; the repository includes custom model code, so `trust_remote_code=True` is required.

### Why do I need trust_remote_code=True?

Huginn's implementation lives in the model repository, not only in the core Transformers library. Without `trust_remote_code=True`, the loader will not execute that custom code and the model will not load correctly.

### What does num_steps control in generate()?

It sets how many recurrent passes the model runs for that generation request. Lower values run faster with less internal computation; higher values spend more compute per token, which may help on harder reasoning prompts at the cost of latency and memory pressure.

### Can Huginn run on Apple Silicon without a discrete GPU?

Yes. With PyTorch MPS enabled, you can target `device = "mps"` on Apple Silicon Macs. Unified memory avoids copying weights between separate CPU and GPU pools, which makes local experimentation practical even without a dedicated NVIDIA card.

## References

- [Huginn on Hugging Face](https://huggingface.co/tomg-group-umd/huginn-0125) - model weights and custom implementation.

## Internal Links

- [What is the MCP Protocol?](/learn/ai/what-is-mcp-server/)
- [What is an LLM context window?](/learn/ai/what-is-llm-context-window/)
- [What is vibe coding?](/learn/ai/what-is-vibe-coding/)
- [LLM markdown wiki: a personal second brain without the maintenance](/learn/ai/llm-markdown-wiki-knowledge-base/)
- [What should a software engineer know? Skills checklist & roadmap](/learn/engineering/software-engineer-knowledge-framework/)
- [Individual AI adoption problems: trust, workflow friction, and what to fix first](/learn/ai/individual-ai-adoption-problems/)
- [Start a conversation with WAVEPILLARS](/contact/)

```json
{"@context":"https://schema.org","@graph":[{"@type":"BlogPosting","headline":"How to run the Huginn depth-recurrent model on Apple Silicon","description":"Load the open-weight Huginn recurrent reasoning model on Apple Silicon with Hugging Face Transformers, MPS, trust_remote_code, and num_steps at inference.","datePublished":"2026-09-05","dateModified":"2026-09-05","url":"https://wavepillars.com/learn/ai/how-to-run-huginn-model-on-apple-silicon/","author":{"@type":"Person","name":"Kiryl Bahdanovich"},"publisher":{"@type":"Organization","name":"WAVEPILLARS","url":"https://wavepillars.com/"},"image":"https://wavepillars.com/og-image.jpg","timeRequired":"PT8M"},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is a depth-recurrent language model?","acceptedAnswer":{"@type":"Answer","text":"It is an architecture that reuses the same transformer-like block for multiple computational passes instead of stacking a fixed number of independent layers. The recurrent step count can often be adjusted at inference time, trading speed against extra computation per token."}},{"@type":"Question","name":"What is Huginn on Hugging Face?","acceptedAnswer":{"@type":"Answer","text":"Huginn (tomg-group-umd/huginn-0125) is an open-weight experimental model from recurrent language-model research. You load it with Hugging Face Transformers; the repository includes custom model code, so trustremotecode=True is required."}},{"@type":"Question","name":"Why do I need trustremotecode=True?","acceptedAnswer":{"@type":"Answer","text":"Huginn's implementation lives in the model repository, not only in the core Transformers library. Without trustremotecode=True, the loader will not execute that custom code and the model will not load correctly."}},{"@type":"Question","name":"What does num_steps control in generate()?","acceptedAnswer":{"@type":"Answer","text":"It sets how many recurrent passes the model runs for that generation request. Lower values run faster with less internal computation; higher values spend more compute per token, which may help on harder reasoning prompts at the cost of latency and memory pressure."}},{"@type":"Question","name":"Can Huginn run on Apple Silicon without a discrete GPU?","acceptedAnswer":{"@type":"Answer","text":"Yes. With PyTorch MPS enabled, you can target device = \\"}}]}]}
```