Pizdec
Collection
2 items • Updated
How to use RaspizdAI/pizdecM2 with llama.cpp:
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf RaspizdAI/pizdecM2 # Run inference directly in the terminal: llama cli -hf RaspizdAI/pizdecM2
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf RaspizdAI/pizdecM2 # Run inference directly in the terminal: llama cli -hf RaspizdAI/pizdecM2
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf RaspizdAI/pizdecM2 # Run inference directly in the terminal: ./llama-cli -hf RaspizdAI/pizdecM2
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf RaspizdAI/pizdecM2 # Run inference directly in the terminal: ./build/bin/llama-cli -hf RaspizdAI/pizdecM2
docker model run hf.co/RaspizdAI/pizdecM2
How to use RaspizdAI/pizdecM2 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "RaspizdAI/pizdecM2"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "RaspizdAI/pizdecM2",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/RaspizdAI/pizdecM2
How to use RaspizdAI/pizdecM2 with Ollama:
ollama run hf.co/RaspizdAI/pizdecM2
How to use RaspizdAI/pizdecM2 with Docker Model Runner:
docker model run hf.co/RaspizdAI/pizdecM2
How to use RaspizdAI/pizdecM2 with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RaspizdAI/pizdecM2
lemonade run user.pizdecM2-{{QUANT_TAG}}lemonade list
pizdecM2 is an experimental micro-model (~520 parameters) built to evaluate character-level arithmetic representations, custom Llama-compatible GGUF metadata mapping, and PyTorch Safetensors export pipelines.
Despite its tiny size, the architecture achieves 100% accuracy on its specialized target domain.
CRITICAL: This model is designed strictly for a single specific task and WILL NOT understand regular text, multi-digit operations, or non-addition prompts.
x+y= where $x$ and $y$ are single digits such that $x + y < 10$.2+3=, 0+0=, 1+8=, 4+5=5+5=, 10+2=, 2*3=, hellopizdecM20-9, +, =, \n)model.safetensors (~2.52 KB)model.gguf (~2.97 KB)tokenizer.json (~0.13 KB)| Layer | Shape | Param Count |
|---|---|---|
embed_tokens.weight |
[13, 10] | 130 |
pos_emb |
[4, 10] | 40 |
ffn.weight |
[14, 10] | 140 |
ffn.bias |
[14] | 14 |
lm_head.weight |
[13, 14] | 182 |
lm_head.bias |
[13] | 13 |
pad |
[1] | 1 |
| Total | 520 |
import json
import torch
import torch.nn as nn
from safetensors.torch import load_file
# Define architecture
class LlamaCompatible500P(nn.Module):
def __init__(self):
super().__init__()
self.embed_tokens = nn.Embedding(13, 10)
self.pos_emb = nn.Parameter(torch.randn(4, 10) * 0.1)
self.ffn = nn.Linear(10, 14)
self.act = nn.SiLU()
self.lm_head = nn.Linear(14, 13)
self.pad = nn.Parameter(torch.zeros(1))
def forward(self, x):
B, T = x.size()
h = self.embed_tokens(x) + self.pos_emb[:T, :]
h_flat = h.mean(dim=1)
feat = self.act(self.ffn(h_flat))
return self.lm_head(feat)
# Load Tokenizer & Model Weights
with open("tokenizer.json", "r", encoding="utf-8") as f:
vocab = json.load(f)["vocab"]
char_to_id = {ch: i for i, ch in enumerate(vocab)}
id_to_char = {i: ch for i, ch in enumerate(vocab)}
model = LlamaCompatible500P()
model.load_state_dict(load_file("model.safetensors"))
model.eval()
# Run Prediction
prompt = "3+5="
tokens = torch.tensor([[char_to_id[c] for c in prompt]])
with torch.no_grad():
logits = model(tokens)
pred_id = torch.argmax(logits, dim=-1).item()
print(f"Input: {prompt} | Output: {id_to_char[pred_id]}")
MIT License