Model reference · open weights

FlyGPT

LLMs QuixiAI Text gen 1 build Open weights 589 dl/mo

FlyGPT is an open-weight language model from QuixiAI. FlyGPT (INT4) weighs 7 MB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • FlyGPT is a character-level text-generation model by QuixiAI that uses a recurrent architecture based on a subgraph of the fruit-fly brain connectome.
  • It contains 2 million parameters and is trained on the Tiny Shakespeare dataset, supporting only the 65 characters of that text.
  • The model is released under the cc-by-4.0 license.

Summary of the QuixiAI/FlyGPT model card, 2026-10-01

What it is

Released byQuixiAI
Released2026-09-14
Parameters2M
VRAM7 MB for the weights

What it runs on

Memory and cards for FlyGPT (INT4)

7 MBweights, file size
631 MBruntime overhead, at least

How much memory each request adds isn't estimated yet for this architecture. The weights need at least the cards below, plus room for the context.

CardWeights alone
RTX 3060 12 GBfits
RTX 4060 Ti 16 GBfits
RTX 3090 24 GBfits
RTX 4090 24 GBfits
RTX 5090 32 GBfits
L40S 48 GBfits
A100 80 GBfits
H100 80 GBfits
RTX PRO 6000 Blackwell 96 GBfits
DGX Spark (GB10) 128 GB unifiedfits
H200 141 GBfits
B200 180 GBfits

From the model card

What QuixiAI says about FlyGPT

Read the model card

A character-level language model whose recurrent architecture is a real subgraph of the fruit-fly brain connectome (MaleCNS v1.0). Unlike the earlier frozen-reservoir approach in ngxson/fly-llm-hf, which keeps the connectome's synaptic weights fixed and trains only the projections and readout, FlyGPT trains one value per real synaptic connection with gradient descent while keeping the fly's edge topology fixed, and compares the result against the same neurons with degree-preserving scrambled connections across paired seeds.

Base model: QuixiAI/MaleCNS, the lossless packaging of the MaleCNS v1.0 connectivity tables. FlyGPT's graph is extracted from it deterministically (build_graph.py, revision pinned in data/fly/build_edges.py); graph.node_id and graph.synapse_count map every edge back to that repository.

This checkpoint's wiring is the original MaleCNS wiring.

Trained. Condition real, seed 1, step 94000, validation loss 1.5778 nats/char on the fixed Tiny Shakespeare split.

This is not a biological simulation of a living fly. The "weights" in the MaleCNS release are anatomical synapse counts; they are stored here as graph.synapse_count and are not the model's parameters.

The graph

Every number below is produced by FlyGPT's extraction script (build_graph.py), not typed by hand.

SourceMaleCNS v1.0 flat connectome (gs://flyem-male-cns/v1.0/connectome-data/flat-connectome/)
Candidate poolcentral brain: superclass starting with cb_ (37,108 neurons)
Minimum synapses per connection3 (engineering choice, not a biological claim)
Extractionlargest SCC → largest directed (k,k)-core with ≥ target nodes (k = 40) → trim by weighted degree
Neurons used5,000
Directed connections used524,324
Synaptic contacts represented8,300,915
Largest SCC fraction1.0
Reciprocal pairs93,055
Input / output neuronstop 256 by out-degree / top 512 by in-degree
Input→output shortest path (median / p90 / max hops)1.0 / 1.0 / 1.0
Graph hashf82b783b7ccb5a354fc4cf3de6de4a98d75029303c55f8faae28ab807828a007

graph.node_id holds the MaleCNS body ids, so every neuron maps back to the release.

What is in model.safetensors

tensorshapedtypesize
graph.edge_index(2, 524324)int324.19 MB
graph.synapse_count(524324,)int322.10 MB
graph.node_id(5000,)int640.04 MB
graph.input_nodes(256,)int640.00 MB
graph.output_nodes(512,)int640.00 MB
recurrent.edge_values(524324,)bfloat161.05 MB
recurrent.bias(5000,)bfloat160.01 MB
recurrent.raw_leak(5000,)bfloat160.01 MB
embed.weight(65, 32)bfloat160.00 MB
input_proj.weight(256, 32)bfloat160.02 MB
input_proj.bias(256,)bfloat160.00 MB
lm_head.weight(65, 512)bfloat160.07 MB
lm_head.bias(65,)bfloat160.00 MB

graph.* is the anatomy (integer, never trained). recurrent.*, embed.*, input_proj.*, lm_head.* are the learned state, stored in bf16. The sparse recurrent matmul is rebuilt in fp32 at runtime (rows = destination, columns = source), with each incoming edge scaled by 1/sqrt(in_degree).

Dynamics

character → embedding (32) → linear → 256 input neurons
proposal_i = tanh( Σ_j W_ij h_j / sqrt(in_degree_i) + external_input_i + bias_i )
h_i ← (1 − leak_i) h_i + leak_i · proposal_i        (2 microsteps per character, leak_i = sigmoid(raw_leak_i))
512 output neuron states → linear → 65 logits

Inference

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained("QuixiAI/FlyGPT")
model = AutoModelForCausalLM.from_pretrained("QuixiAI/FlyGPT", trust_remote_code=True, dtype=torch.float32)

ids = tok("ROMEO:", return_tensors="pt").input_ids
out = model.generate(ids, max_new_tokens=300, do_sample=True, temperature=0.8)
print(tok.decode(out[0]))

# The degree-preserving scrambled control (same neurons, same degrees, shuffled wiring), for comparison:
scrambled = AutoModelForCausalLM.from_pretrained("QuixiAI/FlyGPT", subfolder="scrambled", trust_remote_code=True, dtype=torch.float32)
print(tok.decode(scrambled.generate(ids, max_new_tokens=300, do_sample=True, temperature=0.8)[0]))

# Neuron activity, for visualization: [1, T, 5000] states after each character, plus MaleCNS body ids
with torch.no_grad():
    states = model(ids).state                                   # [B, N] after the last character
body_ids = model.graph.node_id                                  # index -> MaleCNS body id, for lookup in QuixiAI/MaleCNS

The tokenizer is strict: only the 65 characters of Tiny Shakespeare are encodable. generate() carries the neuron state between characters instead of a KV cache.

Training

The recurrent core has one trainable weight per real synaptic connection. With the connectome-kernels package installed, the model's forward pass runs on fused CUDA kernels (about 13× faster than torch.sparse, identical gradients); without it, it falls back to torch.sparse automatically.

# Fine-tune / continue training FlyGPT on Tiny Shakespeare (character-level).
# pip install transformers safetensors
# pip install --no-build-isolation git+https://github.com/QuixiAI/connectome-kernels   # fused CUDA path, ~13x faster
import requests, torch, torch.nn.functional as F
from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained("QuixiAI/FlyGPT")
model = AutoModelForCausalLM.from_pretrained("QuixiAI/FlyGPT", trust_remote_code=True, dtype=torch.float32).cuda()
# start from the untrained initialization instead:  subfolder="init"

text = requests.ge

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms