SAVRN
Search Contact SAVRN

Open-weight model

codeparrot-small-multi

by Tullus Augustus TULLUS/codeparrot-small-multi

A few weeks ago i made a mini gradio server that was special built for running a multimodal.

Parameters111M
Context
Weights469.3 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads66

Runs On

What it takes to serve codeparrot-small-multi (111M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.2 GB 0.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Tullus Augustus, published under apache-2.0, revision eeaf586af27b.

A few weeks ago i made a mini gradio server that was special built for running a multimodal. So now i made it load the new artifac, and more INFOS Below ⬇ CodeParrot-Multi is a GPT-2 model (110M parameters) trained to generate code in 9 programming languages: "Java", "JavaScript", "PHP", "Python", "C#", "C++", "GO", "Ruby" and "TypeScript". You can load the CodeParrot-Multi model and tokenizer directly in transformers: or with a pipeline: The model was trained on the small Github code small after near deduplication, a subset of Github code dataset with the following settings: The training was executed on 16 x A100 (40GB) GPUs. This setting amounts to roughly 58 billion tokens. We evaluated…

Read Tullus Augustus's full model card

TULLUS = I quickly converted the model.bin to model.safetensors file after pulling the base repo.

A few weeks ago i made a mini gradio server that was special built for running a multimodal. So now i made it load the new artifac, and more INFOS Below ⬇

CodeParrot-Multi (small)

CodeParrot-Multi is a GPT-2 model (110M parameters) trained to generate code in 9 programming languages: "Java", "JavaScript", "PHP", "Python", "C#", "C++", "GO", "Ruby" and "TypeScript".

New Usage for the model.safetensors :]

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "TULLUS/codeparrot-small-multi"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

prompt = "def hello_world():"
inputs = tokenizer(prompt, return_tensors="pt")

with torch.no_grad():
    outputs = model.generate(
        **inputs, 
        max_new_tokens=32,
        pad_token_id=tokenizer.eos_token_id
    )

print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Older pythorch.model.bin Usage

You can load the CodeParrot-Multi model and tokenizer directly in transformers:

from transformers import AutoTokenizer, AutoModelWithLMHead

tokenizer = AutoTokenizer.from_pretrained("codeparrot/codeparrot-small-multi")
model = AutoModelWithLMHead.from_pretrained("codeparrot/codeparrot-small-multi")

inputs = tokenizer("def hello_world():", return_tensors="pt")
outputs = model(**inputs)

or with a pipeline:

from transformers import pipeline

pipe = pipeline("text-generation", model="codeparrot/codeparrot-small-multi")
outputs = pipe("def hello_world():")

Training

The model was trained on the small Github code small after near deduplication, a subset of Github code dataset with the following settings:

Config Value
Batch size 192
Context size 1024
Training steps 300'000
Gradient accumulation 2
Gradient checkpointing False
Learning rate 5e-4
Weight decay 0.1
Warmup steps 2000
Schedule Cosine

The training was executed on 16 x A100 (40GB) GPUs. This setting amounts to roughly 58 billion tokens.

Performance

We evaluated the model on OpenAI's HumanEval benchmark which consists of programming challenges:

Metric Value
pass@1 --%
pass@10 --%
pass@100 --%

The pass@k metric tells the probability that at least one out of k generations passes the tests.

Resources


TULLUS Edits

Laboratory initialized. Ready for input.

import time
import torch
import json
import base64
import io
import logging
import os
from typing import Optional, Dict, Any
from PIL import Image
from fastapi import FastAPI, HTTPException
from fastapi.staticfiles import StaticFiles
from fastapi.responses import FileResponse
from pydantic import BaseModel
from transformers import AutoTokenizer, AutoModelForCausalLM
import uvicorn
import transformers


# --- Configuration ---
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
MODEL_PATH = "TULLUS"

These stats load at runtime start in my mini server. ```raw miniserver side panel outputs ▶ MODEL { "name": "gpt2", "architecture": "['GPT2LMHeadModel']", "parameters": "111,008,256", "dtype": "torch.float16" }

RUNTIME { "transformers_version": "5.15.0", "pytorch_version": "2.9.1+rocm7.2.1.gitff65f5bc", "rocm_hip": "7.2.53211-e1a6bc5663", "python_version": "3.12.13" }

▶ GPU { "0": { "name": "AMD Radeon RX 9070 XT", "total_memory": "15.92 GiB", "current_memory": "15.12 GiB" } }


---

# Code completion prompt (model fills in the rest):
"def add_numbers(a, b):\n return"

```code
"def add_numbers(a, b):\n return"
+ a.toString() + " + b.toString();",
"def add_strings(a, b):\n return" + a.toString() + " = 'abc' + b.toString();\n",
"def add_ints(a, b):\n return" + a.toString() + " = 1 + 2;\n",
"def add_floats(a, b):\n return" + a.toString() + " = 3.1415926535897932384626433832795;\n",
"def add_doubles(
  • Stats
{
  "input_tokens": 15,
  "output_tokens": 128,
  "generation_time_sec": 1.068,
  "tokens_per_sec": 119.84,
  "parameters_used": {
    "max_new_tokens": 128,
    "temperature": 0.2,
    "top_p": 0.95,
    "do_sample": true,
    "repetition_penalty": 1.2,
    "pad_token_id": 0,
    "eos_token_id": 0
  }
}

Java completion prompt:

"public class Main {\n public static int add(int a, int b) {\n"

+
" return a+b;\n" +
"}\n\n");
}

@Test
void testAdd() {
assertParse("public class Main {\n public static int add(int a, int b) {\n" +
" return a+b; }\n}\n", false);

assertParse("public class Main {\n public static int add(int a, int b) {\n" +
" return a+b; }\n}\n", true);

assertParse("public class Main {\n public static int add(int a, int b) {\
  • Stats
{
  "input_tokens": 20,
  "output_tokens": 128,
  "generation_time_sec": 1.043,
  "tokens_per_sec": 122.69,
  "parameters_used": {
    "max_new_tokens": 128,
    "temperature": 0.2,
    "top_p": 0.95,
    "do_sample": true,
    "repetition_penalty": 1.2,
    "pad_token_id": 0,
    "eos_token_id": 0
  }
}

// Convert Python dictionary lookup logic to C++ std::map // Python: val = my_dict.get(key, -1)

include

include

int get_value_or_default(const std::map& my_dict, const std::string& key) {

if (my_dict.find(key) != my_dict.end())
return my_dict[key];

// Default value is 0
return 0;
}
  • Stats
{
  "input_tokens": 76,
  "output_tokens": 40,
  "generation_time_sec": 0.823,
  "tokens_per_sec": 48.61,
  "parameters_used": {
    "max_new_tokens": 128,
    "temperature": 0.2,
    "top_p": 0.95,
    "do_sample": true,
    "repetition_penalty": 1.2,
    "pad_token_id": 0,
    "eos_token_id": 0
  }
}

Configuration

Architecture
GPT2LMHeadModel
Vocabulary size
32,768
Model type
gpt2

Identity and Version

Repository
TULLUS/codeparrot-small-multi
Publisher
Tullus Augustus
Task
Not stated by the source
Modality
Other
Library
Not stated by the source
Parameters
111M parameters
Languages
Not stated by the source
Revision
eeaf586af27bc6de23bf7376dc59de089719ae17
First published
2026-09-13
Last updated
2026-09-18

Files and Weights

11 files, 472.3 MB in total. The weights are 2 files totalling 469.3 MB in bin, safetensors.

Weights2 files · 469.3 MB
Configuration2 files · 1.0 KB
Tokenizer4 files · 3.1 MB
Documentation1 file · 6.5 KB
Other1 file · 293 B
Repository1 file · 1.2 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights222.0 MB 4af9b6940fdb
pytorch_model.binWeights247.2 MB 0207f6b427e3
config.jsonConfiguration874 B
generation_config.jsonConfiguration139 B
README.mdDocumentation6.5 KB
eval_results.txtOther293 B
.gitattributesRepository1.2 KB
merges.txtTokenizer283.6 KB
tokenizer.jsonTokenizer2.3 MB
tokenizer_config.jsonTokenizer313 B
vocab.jsonTokenizer503.5 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
469.3 MB
Download from Tullus Augustus

Released by Tullus Augustus through its official repository on Hugging Face. Read the license.

Built From

  • Derived from codeparrot/codeparrot-small-multi
  • Trained on (disclosed) codeparrot/github-code-clean
  • Trained on (disclosed) openai_humaneval

Memory Requirements

PrecisionWeights in memory
As published469.3 MB
16-bit0.2 GB
8-bit0.1 GB
4-bit0.1 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About codeparrot-small-multi

How much GPU memory does codeparrot-small-multi need?

About 0.3 GB at 16-bit and 0.1 GB at 4-bit: the weights (111M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run codeparrot-small-multi on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use codeparrot-small-multi commercially?

Yes. codeparrot-small-multi is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.