OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

MicroGPT.cs

MicroGPT.cs is a compact, dependency-free GPT language-model implementation in C# that includes training and inference. It is a faithful port of microgpt.py, designed as an educational codebase with automatic differentiation, a character-level tokenizer and transformer components.

Independent OpenViST project profile, based on linked sources.

MicroGPT.cs — Learning from a compact implementation with explanatory comments
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you want an inspectable C# learning project or a small experiment covering both GPT training and inference, rather than a production-scale model.

Who it is for

  • C# developers exploring how a GPT language model is implemented.
  • Learners studying automatic differentiation, backpropagation and transformer components.
  • Developers experimenting with small-scale language-model training and text generation.

Documented uses

  • Train a small character-level GPT on a list of human names.
  • Generate new name-like text from the trained model.
  • Study how tokenization, attention, an MLP, automatic differentiation and optimization fit together in a GPT implementation.
  • Adjust documented model and training settings through command-line arguments.
Before you choose

Requirements & limits

The repository is public, identifies an MIT license and documents .NET 10.0 as its platform requirement.

  • The example uses character-level tokens and trains on human names, producing name-like samples rather than a general-purpose chat model.
  • The project includes its own scalar autograd engine and neural-network building blocks in C#.
  • The README describes the implementation as educational and notes that it processes one number at a time instead of using GPU-parallel computation.
  • The quick start and documented settings use the .NET CLI.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Run the documented GPT training and generation example

Start the project with its default settings to train the small model and generate name-like samples.

Before you start

  • .NET 10.0
  • A local copy of the repository
  • A command-line shell with the .NET CLI

Steps

  1. Open a shell in the repository.

  2. Change directory to src/AutogradEngine.

  3. Run dotnet run.

Expected outcome

The README describes training output followed by generated name-like samples.

Guide limitations

  • The example is a small educational model, not production code.
  • The implementation processes one number at a time rather than using GPU-parallel computation.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 November 2026
Original website title
milanm/AutoGrad-Engine · Official homepage title · retained in its source language