GitHub - NeuralBlitz/Goainglys: Fully Go AI Framework · GitHub
Skip to content

NeuralBlitz/Goainglys

Repository files navigation

image

Goainglys - Native Go ML Platform

A comprehensive machine learning platform written entirely in pure Go with zero external dependencies. Implements 15+ distinct ML components from tensors to production APIs.

Architecture

┌─────────────────────────────────────────────────────────────────────────────┐
│                              Goainglys ML Platform                           │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  ┌──────────────────────────┐    ┌───────────────────────────────────────┐  │
│  │      Core Foundation     │    │           MLOps & Tooling             │  │
│  ├──────────────────────────┤    ├───────────────────────────────────────┤  │
│  │ tensor/     Tensor ops   │    │ portal/       Unified web platform    │  │
│  │ nn/         NN layers    │    │ dashboard/    Training metrics        │  │
│  │ transformer/ Full model  │    │ model_registry/ Version control      │  │
│  └──────────────────────────┘    │ marketplace/  MCP apps marketplace    │  │
│                                  └───────────────────────────────────────┘  │
│  ┌──────────────────────────┐    ┌───────────────────────────────────────┐  │
│  │     Specialized ML       │    │             AI Agents                │  │
│  ├──────────────────────────┤    ├───────────────────────────────────────┤  │
│  │ transformers/ GPT/BERT   │    │ agents/       ReAct, Plan-Execute    │  │
│  │ vector_db/   HNSW index  │    │ self_improving_agents/               │  │
│  │ asr/         Speech      │    │            Recursive improvement     │  │
│  │ finetune/    LoRA tuning │    └───────────────────────────────────────┘  │
│  └──────────────────────────┘                                               │
│                                                                              │
│  ┌──────────────────────────────────────────────────────────────────────┐   │
│  │                      Advanced Research                               │   │
│  ├──────────────────────────────────────────────────────────────────────┤   │
│  │ Mixture of Experts │ Diffusion Models │ RL Agents │ Graph Neural Nets│   │
│  └──────────────────────────────────────────────────────────────────────┘   │
│                                                                              │
└─────────────────────────────────────────────────────────────────────────────┘

Projects

Project Description Status
tensor/ Core tensor operations with gradient tracking Complete
nn/ Unified neural network layers and optimizers Complete
transformer/ Full Transformer (Vaswani et al., 2017) with backprop Complete
transformers/ Native GPT-2 and BERT implementations Complete
vector_db/ HNSW-based vector similarity search Complete
asr/ Speech recognition with MFCC & LSTM Complete
finetune/ Fine-tuning with LoRA, AdamW, Lion optimizers Complete
agents/framework/ ReAct, Plan-Execute, Supervisor agents Complete
self_improving_agents/ Recursive self-improvement system Complete
Advanced-Research/ MoE, Diffusion, RL, GraphNN implementations Complete
rag_eval/ RAG/LLM evaluation toolkit Complete
dashboard/ Real-time training metrics visualization Complete
model_registry/ Model versioning and staging system Complete
marketplace/ MCP apps marketplace with REST API Complete
portal/ Unified web platform (all services combined) Complete
benchmarks/ Performance benchmark suites Complete

Quick Start

# Transformer demo
cd /home/runner/workspace && GOWORK=off go run main.go

# Vector database
cd vector_db && GOWORK=off go run .

# ASR pipeline
cd asr && GOWORK=off go run cmd/main.go

# Agent framework
cd agents/framework && GOWORK=off go run main.go

# Fine-tuning
cd finetune && GOWORK=off go run main.go

# GPT/BERT
cd transformers && GOWORK=off go run main.go

# Web services
cd dashboard && go run main.go        # :8080
cd model_registry && go run main.go   # :8081
cd marketplace && go run main.go      # :8082
cd portal && go run main.go           # :8083 (unified)

Performance

Component Metric Value
Transformer Training ~2.5s/epoch
Transformer Backprop ~8s/epoch
Vector DB Insert 10k vectors/s
Vector DB Search ~20µs
ASR Speed 75x realtime
RAG Eval Throughput 10k evals/s

Core Components

Tensor Operations (tensor/)

type Tensor struct {
    Data    []float64
    Shape   []int
    Grad    []float64
    ReqGrad bool
}

Transformer Config (transformer/)

type Config struct {
    ModelDim  int
    NumHeads  int
    NumLayers int
    FFNDim    int
    VocabSize int
    MaxSeqLen int
    Dropout   float64
}

Agent Framework (agents/framework/)

agent := agents.NewReActAgent(config, llmProvider)
result := agent.Run(ctx, "Your task here")

API Endpoints

Portal (Unified Platform)

  • GET /api/dashboard/metrics - Training metrics
  • GET /api/models - Model registry
  • GET /api/marketplace/apps - Marketplace apps

Marketplace

  • GET /api/apps - List apps
  • GET /api/apps/search?q= - Search
  • POST /api/apps - Register app
  • GET /api/stats - Statistics

Model Registry

  • GET /api/models - List models
  • POST /api/models - Create model
  • GET /api/models/:id/versions - List versions
  • PUT /api/models/:id/versions/:v - Update stage

Design Principles

  1. Zero Dependencies - Only Go standard library
  2. Full Transparency - Complete algorithm implementations, no black boxes
  3. Modular Design - Each module is independently importable
  4. Production Ready - REST APIs, web UIs, persistence

Directory Structure

/workspace/
├── tensor/                 # Tensor data structures & math
├── nn/                     # Unified NN layers, optimizers, schedulers
├── transformer/            # Full Transformer with backpropagation
├── transformers/           # GPT-2 and BERT implementations
├── vector_db/              # HNSW vector database
├── asr/                    # Speech recognition (MFCC, LSTM, CTC)
├── finetune/               # Fine-tuning with LoRA support
├── agents/framework/       # AI agent framework
├── self_improving_agents/  # Recursive self-improvement
├── Advanced-Research/      # MoE, Diffusion, RL, GraphNN
├── rag_eval/               # RAG/LLM evaluation toolkit
├── dashboard/              # Training metrics dashboard
├── model_registry/         # Model versioning system
├── marketplace/            # MCP apps marketplace
├── portal/                 # Unified web platform
├── benchmarks/             # Performance benchmarks
├── opencode-lrs-agents-nbx/# Distributed training components
└── main.go                 # Root demo

Key Files

File Purpose
tensor/tensor.go Core tensor with gradient support
tensor/ops.go Mathematical operations (matMul, softmax, etc.)
transformer/model.go Complete encoder-decoder architecture
transformer/backward.go Full backpropagation implementation
nn/layers.go Linear, Embedding, LayerNorm layers
nn/optimizers.go Adam, AdamW, SGD, Lion, RMSprop
vector_db/hnsw.go HNSW ANN search index
asr/model.go LSTM acoustic model
agents/framework/core/types.go Agent, Tool, Message types
portal/main.go Unified platform entry point

Benchmarks

Run the benchmark suite:

cd benchmarks
go test -bench=. ./...

Benchmarks cover tensor operations, transformer training, ASR pipeline, and vector DB performance.

License

MIT License - Free to use, modify, and distribute.


Built with pure Go - zero external dependencies

Packages

Contributors