0
stars
777
commits
Jupyter Notebook
primary language
Sep 26, 2025
updated
AI Manuals for AI Models.
Paste a model card and get a runnable, graded manual in minutes—no more guessing at the screws.
Built for the OpenAI Open Model Hackathon (openai.devpost.com) and awarded 🥉 3rd place at the leap.new Open Source Hackathon 2025.
New models ship faster than instructions to use them. They’re the IKEA pieces dumped on your floor—full of potential, but unusable without a manual. ALAIN is that manual, born during the OpenAI Open Model Hackathon to make “model release → model running” a matter of minutes.
AI adoption follows instructions. ALAIN provides them for any model.
# Install dependencies (root). This also builds the packages via prepare hooks.
npm install
# (Optional) rebuild the packages manually while iterating on the kit
npm run alain:build
# Generate a manual from the CLI
env POE_API_KEY=your_key \
npm run alain:cli -- \
--model gpt-oss-20b \
--baseUrl https://api.poe.com \
--difficulty beginner \
--maxSections 6 \
--outDir output/manuals
The CLI writes:
*.ipynb – runnable notebook manualalain-validation-*.md – quality + readability reportalain-metrics-*.json – structured metrics (sections, FK grade, Markdown ratio, timings).env.local.example – seeded if you haven’t created one yetnpm install
npm run dev:hosted # or npm run dev:offline for local providers
Then visit http://localhost:3000/generate and drop in a model URL (e.g., https://huggingface.co/openai/gpt-oss-20b). Toggle “Force fallback (no backend)” for web-only demos.
--baseUrl (or ALAIN_BASE_URL) to any OpenAI-compatible endpoint. Leave it blank for Poe or point it at http://localhost:11434 for Ollama/vLLM. Local runs can skip --apiKey.OPENAI_BASE_URL/OPENAI_API_KEY (or POE_API_KEY) in your .env to swap between Poe, local vLLM, or other APIs with no code edits.pip install -U transformers kernels accelerate triton (PyTorch >= 2.8 already bundles Triton 3.4).openai/gpt-oss-20b, pass use_kernels=True to fetch the Hub-hosted Liger RMSNorm and MegaBlocks MoE kernels. Compare this bf16 path with the default MXFP4 run to match your VRAM budget.attn_implementation="kernels-community/vllm-flash-attn3".npm install
npm --workspace apps/backend run dev
Key endpoints live under apps/backend/execution/* (lesson generation, execution router, exports).
.env management, and client/provider smoke tests.| Layer | Highlights |
|---|---|
| Teacher | gpt-oss-20b (Harmony prompt) generates outlines and sections; retries + repair for spec compliance |
| Pipelines | packages/alain-kit core orchestrates outline → sections → notebook build → validation |
| Runners | Web: Next.js + Monaco + Pyodide/Worker; Backend: Encore.dev TypeScript services |
| Providers | Poe API (default) and any OpenAI-compatible base URL; offline supported |
| Observability | Structured logging, metrics (GET /execution/metrics), timing/tracing in ALAIN‑Kit core |
See docs/architecture/ for the detailed diagrams and the lesson schema in resources/schemas/alain-lesson.schema.json.
/notebooks within the app.
├── apps
│ ├── backend # Encore.dev services, execution router, exports
│ └── web # Next.js app (lesson builder, gallery, SSE runners)
├── packages
│ └── alain-kit-sdk # CLI + SDK entry points (ALAIN-Kit)
├── resources # Brand assets, schemas, research outputs
├── tests # Notebook + validator smoke suites
└── docs # Operations, developer guides, prompts
npm run test:purenpm run alain:examplenpm run validate:lesson path/to/lesson.jsonbackend/validation/colab-validator.test.ts ensures subprocess pip installs are guarded automatically. Manual instructions live in TESTING_INSTRUCTIONS.md (Section 6).npm run lint:prompts verifies the packaged prompt templates match the root prompts (ideal for CI).Feedback, ideas, or contributions are welcome—open an issue or ping @danielgreen.
MIT © 2025 Applied Learning AI Notebooks
ALAIN started as a leap.new Open Source Hackathon project and continues thanks to contributors exploring better ways to learn AI through practice. Manuals beat guesswork—thanks for helping models teach themselves.
Jupyter Notebook
45.6%
TypeScript
30.5%
HTML
13.2%
Python
8.1%
JavaScript
2.3%
0
stars
777
commits
Jupyter Notebook
primary language
Sep 26, 2025
updated
AI Manuals for AI Models.
Paste a model card and get a runnable, graded manual in minutes—no more guessing at the screws.
Built for the OpenAI Open Model Hackathon (openai.devpost.com) and awarded 🥉 3rd place at the leap.new Open Source Hackathon 2025.
New models ship faster than instructions to use them. They’re the IKEA pieces dumped on your floor—full of potential, but unusable without a manual. ALAIN is that manual, born during the OpenAI Open Model Hackathon to make “model release → model running” a matter of minutes.
AI adoption follows instructions. ALAIN provides them for any model.
# Install dependencies (root). This also builds the packages via prepare hooks.
npm install
# (Optional) rebuild the packages manually while iterating on the kit
npm run alain:build
# Generate a manual from the CLI
env POE_API_KEY=your_key \
npm run alain:cli -- \
--model gpt-oss-20b \
--baseUrl https://api.poe.com \
--difficulty beginner \
--maxSections 6 \
--outDir output/manuals
The CLI writes:
*.ipynb – runnable notebook manualalain-validation-*.md – quality + readability reportalain-metrics-*.json – structured metrics (sections, FK grade, Markdown ratio, timings).env.local.example – seeded if you haven’t created one yetnpm install
npm run dev:hosted # or npm run dev:offline for local providers
Then visit http://localhost:3000/generate and drop in a model URL (e.g., https://huggingface.co/openai/gpt-oss-20b). Toggle “Force fallback (no backend)” for web-only demos.
--baseUrl (or ALAIN_BASE_URL) to any OpenAI-compatible endpoint. Leave it blank for Poe or point it at http://localhost:11434 for Ollama/vLLM. Local runs can skip --apiKey.OPENAI_BASE_URL/OPENAI_API_KEY (or POE_API_KEY) in your .env to swap between Poe, local vLLM, or other APIs with no code edits.pip install -U transformers kernels accelerate triton (PyTorch >= 2.8 already bundles Triton 3.4).openai/gpt-oss-20b, pass use_kernels=True to fetch the Hub-hosted Liger RMSNorm and MegaBlocks MoE kernels. Compare this bf16 path with the default MXFP4 run to match your VRAM budget.attn_implementation="kernels-community/vllm-flash-attn3".npm install
npm --workspace apps/backend run dev
Key endpoints live under apps/backend/execution/* (lesson generation, execution router, exports).
.env management, and client/provider smoke tests.| Layer | Highlights |
|---|---|
| Teacher | gpt-oss-20b (Harmony prompt) generates outlines and sections; retries + repair for spec compliance |
| Pipelines | packages/alain-kit core orchestrates outline → sections → notebook build → validation |
| Runners | Web: Next.js + Monaco + Pyodide/Worker; Backend: Encore.dev TypeScript services |
| Providers | Poe API (default) and any OpenAI-compatible base URL; offline supported |
| Observability | Structured logging, metrics (GET /execution/metrics), timing/tracing in ALAIN‑Kit core |
See docs/architecture/ for the detailed diagrams and the lesson schema in resources/schemas/alain-lesson.schema.json.
/notebooks within the app.
├── apps
│ ├── backend # Encore.dev services, execution router, exports
│ └── web # Next.js app (lesson builder, gallery, SSE runners)
├── packages
│ └── alain-kit-sdk # CLI + SDK entry points (ALAIN-Kit)
├── resources # Brand assets, schemas, research outputs
├── tests # Notebook + validator smoke suites
└── docs # Operations, developer guides, prompts
npm run test:purenpm run alain:examplenpm run validate:lesson path/to/lesson.jsonbackend/validation/colab-validator.test.ts ensures subprocess pip installs are guarded automatically. Manual instructions live in TESTING_INSTRUCTIONS.md (Section 6).npm run lint:prompts verifies the packaged prompt templates match the root prompts (ideal for CI).Feedback, ideas, or contributions are welcome—open an issue or ping @danielgreen.
MIT © 2025 Applied Learning AI Notebooks
ALAIN started as a leap.new Open Source Hackathon project and continues thanks to contributors exploring better ways to learn AI through practice. Manuals beat guesswork—thanks for helping models teach themselves.
Jupyter Notebook
45.6%
TypeScript
30.5%
HTML
13.2%
Python
8.1%
JavaScript
2.3%