File size: 938 Bytes
fe4ef3f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
library_name: aneforge
license: mit
base_model: openai-community/gpt2
pipeline_tag: text-generation
tags:
- aneforge
- apple-neural-engine
---

# GPT-2 (ANEForge)

An unmodified duplicate of [`openai-community/gpt2`](https://huggingface.co/openai-community/gpt2), tagged for use with
[**ANEForge**](https://github.com/sbryngelson/ANEForge) so the weights load and run directly on the
Apple Neural Engine (no CoreML). Weights are byte-identical to the source; see the original repo for
the model details. Licensed `mit` from the source.

## Use with ANEForge

```python
import aneforge as af

model = af.load_gpt2("aneforge/gpt2")
print(model.generate_text("The Apple Neural Engine is", max_new_tokens=20))
```

ANEForge compiles the model's graph into a single ANE program and streams the weights from this repo
via `huggingface_hub`. See the [docs](https://aneforge.readthedocs.io) and the
[paper](https://arxiv.org/abs/2606.17090).