--- language: - en license: mit library_name: aether-kit pipeline_tag: text-generation base_model: openai-community/gpt2 tags: - aether-kit - core-ai - gpt2 - text-generation - experimental --- # GPT-2 124M for Aether Kit A macOS Core AI conversion of [openai-community/gpt2](https://huggingface.co/openai-community/gpt2), using upstream revision `607a30d783dfa663caf39e06633721c8d4cfcd7e`. Built with the GPT-2 port spike for Aether Kit v0.0.6, source commit [`20bbc96`](https://github.com/bubstackdev/aether-kit/commit/20bbc96). ## Bundle `mac/` is an Aether language bundle: `language-model.json`, `model.aimodel/`, `tokenizer/`, and `export-report.json`. It requires Apple silicon and macOS 27 with Core AI. There is no qualified iOS bundle in this repository. The model uses fp16 weights and KV caches, float32 scaled dot-product attention, and the bucketed cache contract. The maximum context is **1,024 tokens**, including prompt and generated tokens; the exported prefill bound is 64 tokens. GPT-2 is a base completion model without a chat template. Use plain text/token prompts with `AetherLanguageCoreAI.LanguageGenerationSession`; the chat facade reports `unsupportedTemplate`. This conversion adds no instruction tuning. ```swift import AetherLanguageCoreAI import AetherLanguageTokenizers let tokenizer = try await LanguageTokenizer.open(bundle: bundle) let session = try await LanguageGenerationSession.open(bundle: bundle, platform: .macos) let result = try await session.generate( prompt: tokenizer.encode("The future of artificial intelligence is"), maximumTokens: 64) print(tokenizer.decode(result.tokens)) await session.unload() ``` Download `mac/` at an immutable Hub commit and pass that local directory as `bundle`. A pinned Aether catalog entry is maintained in [`Spikes/gpt2/catalog-macos.json`](https://github.com/bubstackdev/aether-kit/blob/main/Spikes/gpt2/catalog-macos.json). The bundle's model SHA-256 is `f04fefaa3a7e69f3e4da783ce1ac5aef7f80e0bc70e441db452ec691e7429316`. ## Qualification and limits Evidence is included under `verification/`; commands and architecture notes are in [`Spikes/gpt2`](https://github.com/bubstackdev/aether-kit/tree/main/Spikes/gpt2). The converter used Torch 2.11.0, Transformers 4.57.3 and coreai-torch 0.4.2. Tests ran on macOS build 26B123, Core AI device architecture `h17c`. - The float32 eager port matches all 64 reference argmax rows on both a six-token prompt and a 600-token prompt, under both running and bucketed cache contracts. - The full converted checkpoint passes its Core AI CPU logits/cache self-check. - Both registered-bundle native GPU cases pass Aether's fp16 numerical policy: per-row cosine >= 0.995; differing choices require a reference probability margin below 0.1 and a native choice within the reference top five. Prefill widths 7 and 16 produce identical native continuations. - The 600-token prompt matches the full 64-token upstream greedy continuation. The short prompt has one near-tie among 64 teacher-forced rows and first diverges in free generation at token index 40: native rank 2, reference probability margin approximately 0.00139. This conversion does not promise bit-exact float32 output. This is an experimental v0.0.6 spike asset. Qualification covers these synthetic prompts on one Mac, not general task quality, every Apple device, or iOS. GPT-2 retains the capabilities and limitations described in its [upstream model card](https://huggingface.co/openai-community/gpt2). ## License and provenance The original GPT-2 assets retain the Modified MIT terms in `LICENSE`, Copyright (c) 2019 OpenAI. `NOTICE` identifies conversion and architecture sources. The Aether Kit conversion tooling is Apache-2.0. This repository distributes a Core AI conversion and tokenizer assets; it is not an OpenAI-hosted model service.