One Platform. Three Ways to Build AI/ML Applications.

Build, Train, and Serve AI Models in Java

Gollek is a unified platform that works as a High-Performance Serving Engine, a PyTorch-like ML Framework, and a Universal Inference Runtime. Build, train, and deploy with native Java speed.

PyTorch-like API GPU Accelerated ONNX Audio/TTS WAV/FLAC/MP3 Native Java ML

Choose Your Path

Gollek adapts to your needsβ€”whether you're a developer who wants quick CLI commands, a researcher building models, or an enterprise deploying production inference services.

1. Dual-Mode CLI

Unified distribution that runs as an interactive CLI or a high-performance REST/Web server. Pull, list, run, and inspect local models, including ONNX image and audio pipelines, from one tool.

Dual-Mode (CLI/REST) GraalVM Native GGUF Quantizer MOSS TTS ONNX Live Audio
Example:
gollek pull OpenMOSS-Team/MOSS-TTS-Nano-100M-ONNX
gollek run --model 71e8f7 --prompt "hello" \
  --voice "en Trump" --audio-quality balanced \
  --live-audio --output hello.mp3
gollek run --model 71e8f7 --list-voices
Core Engine

2. ML Framework

Build and train neural networks with a native Java API. Tensors with autograd, 118+ modules, and advanced indexing for complex architectures.

118+ NN Layers Autograd v2 Vision/NLP Transforms Metal/CUDA Accelerated JBang/Jupyter Integration
Example (Pure Java):
// Build a Transformer Block
Sequential block = new Sequential(
    new MultiHeadAttention(512, 8),
    new LayerNorm(512),
    new Linear(512, 2048),
    new ReLU(),
    new Linear(2048, 512)
);

3. Serving Runtime

High-performance inference engine with vLLM-style continuous batching. Production-ready REST/Web API with PagedAttention and multi-backend support.

Continuous Batching PagedAttention Multi-Backend (GGUF/PT) REST / Web UI Enterprise Metrics
Example (Server API):
// Submit Inference Request to Runtime
ScheduledRequest request = new ScheduledRequest(
    "req-123",
    "Explain quantum computing",
    512  // maxTokens
);
scheduler.submit(request);

Why Gollek?

As a CLI Tool

  • Quick Inference: Multi-provider chat
  • Model Mgmt: List, pull, and verify
  • Audio Generation: MOSS TTS ONNX to WAV/FLAC/MP3
  • Quantization: GPTQ, AWQ, INT8, FP8

As an ML Framework

  • GradTensor: Autograd v2 engine
  • 118+ Layers: Linear to Transformers
  • Hardware: CUDA, Metal, ROCm kernels
  • Distributed: Cluster-wide training

As a Serving Runtime

  • Dual-Mode: CLI and REST/Web Server
  • Optimization: Continuous Batching
  • Enterprise: Metrics, Health, Tracing
  • High Perf: PagedAttention KV-Cache

🧠 ML Framework

PyTorch-like API: Tensors, Autograd, 118+ NN modules, Advanced Tensor Ops, and Multimodal layers.

πŸŒ€ DiffusionOPD

Java-first on-policy distillation for diffusion models, integrated as native Gollek training modules.

πŸ”€ Byte-Latent Models

Fast Byte Latent Transformer style architecture work, mapped to dedicated Gollek language-model modules.

πŸ’» CLI Tool

Install via brew, choco, or curl. Chat, convert, generate audio, and manage models.

ONNX Text-to-Speech

MOSS TTS Nano support with voice presets, Suling WAV/FLAC/MP3 output, live preview, quality presets, and audio run metrics.

πŸš€ Inference Runtime

High-performance serving with GPU acceleration and unified Multimodal SDK.

Extensions

Scaffold and install pipeline or adapter packages for OCR, TTS, training, quantization, optimization, backends, datasets, and evaluators.

πŸ“š Examples

23+ ready-to-run scripts: from Hello World to Transformer classifiers.

⚑ GPU Kernels

CUDA, Metal, ROCm with FlashAttention 2/3/4 and FP8/FP4 precision.

πŸ“ Blog

Release notes, architecture updates, and implementation progress.

Latest Release SDK v0.2 Stable

Achieved 75% PyTorch parity with 118+ NN modules, advanced tensor indexing (broadcasting), and native vision/NLP transforms.

View Release Notes
Ecosystem JBang Examples

23+ verified scripts covering everything from raw tensor math to complex Transformer training and LangChain4j integrations.

Browse Catalog
Optimization Advanced Quantization

Native support for GPTQ, AWQ, and TurboQuant. Achieve 8x model compression with minimal quality loss for edge deployment.

Explore Quantization
Audio Runtime MOSS TTS ONNX

Local text-to-speech now runs through a multi-session ONNX pipeline with voice presets, companion codec discovery, Suling WAV/FLAC/MP3 output, live PCM preview, and realtime-factor reporting.

Read TTS Guide
Compatibility Universal GGUF Engine

Support for 40+ model families including Llama 3.2, DeepSeek, and Grok with optimized K-quantization kernels.

Learn More

Try the CLI Experience

Experience the speed of Gollek's automated hardware detection and local inference.

Quick Start

1. Install CLI

# MacOS / Linux / Windows
curl -sSL https://raw.githubusercontent.com/bhangun/gollek/main/scripts/install.sh | bash

2. Add SDK Dependency

<dependency>
    <groupId>tech.kayys.gollek</groupId>
    <artifactId>gollek-sdk-ml</artifactId>
    <version>0.2.0-SNAPSHOT</version>
</dependency>

3. Run Inference (Local GGUF)

GollekLocalClient client = GollekSdkFactory.createLocalSdk();
var response = client.generate(InferenceRequest.on("llama-3.2-3b").prompt("Hi!"));
System.out.println(response.text());

Key Features

Category CLI Framework Agent Platform
Inference βœ… βœ… βœ…
Audio/TTS βœ… βœ… βœ…
Training ❌ βœ… ❌
GPU Acceleration βœ… βœ… βœ…
Continuous Batching βœ… ❌ βœ…
Agent Orchestration ❌ ❌ βœ…
Memory & Tools ❌ βœ… βœ…
HITL & Prompts ❌ βœ… βœ…

Supported Providers & Runtimes

Cloud AI

OpenAI (o1/GPT-4) Anthropic (Claude 3.5) Google Gemini 1.5 Cerebras (Llama 3.1) Mistral / Mixtral

Local Engines & Formats

GGUF (llama.cpp) SafeTensors (LibTorch) ONNX Runtime MOSS TTS ONNX MOSS Audio Tokenizer ONNX Stable Diffusion ONNX PyTorch JIT (.pt) Whisper (STT)

Extensions & Plugins

Installable Extensions Feature Adapters Inference Pipelines Built-in Runtime Plugins Training / Quantization / Backend Capabilities

Architecture Overview

graph TD User["User Application / Wayang Agent"] --> Unified["Gollek Unified Runtime"] subgraph Interface_Layer ["Interface Layer"] Unified --> CLI["Dual-Mode CLI (Management/Chat)"] Unified --> REST["Production REST / Web API"] Unified --> SDK["Native Java SDK (Panama/FFI)"] end subgraph Serving_Layer ["Inference & Serving Engine"] Unified --> Engine["Universal Inference Core"] Engine --> Batch["Continuous Batching Scheduler"] Engine --> Cache["PagedAttention KV-Cache"] Engine --> Optim["15+ Optimization Plugins"] end subgraph Framework_Layer ["ML Framework (Training)"] Unified --> FW["PyTorch-like Framework"] FW --> Tensor["GradTensor (Autograd v2)"] FW --> NN["118+ Neural Network Layers"] FW --> Data["Vision/NLP Preprocessing"] end subgraph Core_Engine ["Compute Backend Layer"] Engine --> Backends{"Compute Dispatcher"} FW --> Backends Backends --> CUDA("CUDA / NV") Backends --> Metal("Metal / Apple") Backends --> ROCm("ROCm / AMD") Backends --> CPU("Pure Java / Vector") end

🌟 Gollek Platform Roadmap

Gollek represents the core foundation of the Wayang Multi-Agent Platform.

Phases 1-3: Deep Learning

118+ layers, Tensor Autograd v2, Metal/CUDA stabilization. ✨ COMPLETED

Phases 4-7: Agent Platform

SPI Skill integration, Module Adapters (Memory, Tools, HITL, Prompt), AgentSkills.io compliance. ✨ COMPLETED

Phases 8-9: Production

85% size reduction, OpenTelemetry integration, 118+ tests. ✨ COMPLETED


Community and Support


Gollek AI is open source and available under the Apache 2.0 License.