neuralfn-torch

Build, train, and export Torch-backed NeuralFn models via the Python API.

2|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/adamdroberts/NeuralFn --skill neuralfn-torch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neuralfn-torch
Source: https://github.com/adamdroberts/NeuralFn/tree/main/.cursor/skills/neuralfn-torch
Command: npx skills add https://github.com/adamdroberts/NeuralFn --skill neuralfn-torch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build, train, and export Torch-backed NeuralFn models using the Python API to enable rapid development and deployment of transformer-based systems.

Core Features & Use Cases

  • Build and configure Graphs: create model graphs using NeuralFn presets (nanogpt, llama, jamba, etc.), set ModelSpec/BlockSpec, and compile with Torch runtime.
  • Train and export: train Torch models with TorchTrainer and export weights to .pt for inference or deployment.
  • Inference-ready: generate autoregressive outputs and export fully runnable Torch modules for integration in Python projects.

Quick Start

Install NeuralFn, import the NeuralFn Python API, and run the provided end-to-end example to build, train, and export a Torch-backed model.

Frequently Asked Questions about neuralfn-torch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train and export Torch models using NeuralFn presets?

To train and export Torch models, use the NeuralFn Python API to configure ModelSpec and BlockSpec with presets like nanogpt, llama, or jamba, compile the graph with TorchTrainer, and export the trained weights to a .pt file for inference or deployment in Python projects.

What NeuralFn presets are available for building transformer-based model graphs?

NeuralFn supports presets including nanogpt, llama, and jamba for configuring transformer-based model graphs. You select a preset when setting up your ModelSpec and BlockSpec before compiling the graph with the Torch runtime.

Do I need the NeuralFn Python SDK and Torch runtime to build and train models?

Yes, building, training, and exporting Torch-backed NeuralFn models requires the NeuralFn Python SDK and the Torch runtime. Optional MCP tooling is also available for integrating the training workflow with model automation pipelines.

Can I generate autoregressive outputs from exported Torch modules?

Yes, the NeuralFn workflow generates fully runnable Torch modules that support autoregressive outputs. Once training is complete via TorchTrainer, you can export the weights and run inference directly within your Python projects.

What is the best way to deploy Torch-backed NeuralFn models for inference?

The best way to deploy Torch-backed NeuralFn models is to train them using TorchTrainer and export the resulting weights to a .pt file. This produces an inference-ready, fully runnable Torch module that integrates directly into Python deployment environments.

How does configuring ModelSpec and BlockSpec work when compiling NeuralFn graphs?

Configuring ModelSpec and BlockSpec involves defining the architecture layers and parameters for your chosen NeuralFn preset. Once set, you compile the graph with the Torch runtime to prepare the model for training with TorchTrainer and subsequent weight export.