Skip to Content
OchreML
Resources & Protocol

ochreml://catalog/nn

Read-only MCP resource exposing ochreml.nn modules, layers, activations, Transformer/LLM blocks, LoRA, losses, and optimizers.

ochreml://catalog/nn is a read-only MCP resource (mimeType: "application/json") exposing the deep learning API surface of ochreml.nn so an AI assistant can inspect exact module names, constructor arguments, and methods without guessing.

It is backed by ochreml._ops.op_catalog().

Resource Metadata

FieldValue
uriochreml://catalog/nn
nameOchreML Deep Learning (ochreml.nn) Catalog
mimeTypeapplication/json

Example JSON-RPC Read Request

{
  "jsonrpc": "2.0",
  "id": 12,
  "method": "resources/read",
  "params": {
    "uri": "ochreml://catalog/nn"
  }
}

Response Structure

The JSON text inside result.contents[0].text has three top-level keys:

{
  "version": "0.3.7a1",
  "persistence": {
    "extension": ".dit",
    "magic": "DIT\\x01"
  },
  "nn": {
    "core": [...],
    "layers_and_activations": [...],
    "transformer_and_lora": [...],
    "losses_and_optimizers": [...]
  }
}

Module Categories (4)

Category KeyIncluded Classes
coreTensor, Parameter, Module, ModuleList, Sequential
layers_and_activationsLinear, Conv2d, DepthwiseConv2d, MaxPool2d, AvgPool2d, GlobalAvgPool2d, BatchNorm2d, Flatten, ResidualBlock, RNN, GRU, LSTM, Embedding, LayerNorm, RMSNorm, Dropout, ReLU, Sigmoid, Tanh, GELU, SiLU
transformer_and_loraPositionalEncoding, RoPE, ScaledDotProductAttention, MultiHeadAttention, SwiGLU, FeedForward, TransformerEncoder, TransformerDecoder, CausalLM, LoRALinear, LoRAAdapterState
losses_and_optimizersMSELoss, CrossEntropyLoss, SGD, Adam, AdamW, StepLR, CosineAnnealingLR, WarmupCosineLR

On this page