Text Generation
PyTorch
English
jl_code_python
code
python
python-code
code-generation
code-completion
causal-language-modeling
decoder-only
programming-language-model
small-language-model
from-scratch
random-initialization
custom-architecture
custom-pytorch
byte-level-bpe
rope
rmsnorm
swiglu
consumer-gpu
rtx-3060
research
jumplander
jl-code
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,227 +1,615 @@
|
|
| 1 |
---
|
| 2 |
-
language:
|
| 3 |
-
- en
|
| 4 |
license: apache-2.0
|
|
|
|
|
|
|
| 5 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
| 6 |
tags:
|
| 7 |
-
- code
|
| 8 |
-
- python
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
-
family. The goal of this family is to build specialized models for
|
| 25 |
-
individual programming languages.
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
-
|
| 30 |
-
- JLCM-Rust
|
| 31 |
-
- JLCM-C++
|
| 32 |
-
- JLCM-PHP
|
| 33 |
-
- JLCM-SQL
|
| 34 |
|
| 35 |
-
|
| 36 |
|
| 37 |
-
#
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
understanding.
|
| 50 |
|
| 51 |
-
|
| 52 |
-
production coding models.
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
|
| 59 |
-
------------------- --------------------------
|
| 60 |
-
Model Type Decoder-only Transformer
|
| 61 |
-
Parameters 97,536,768
|
| 62 |
-
Layers 12
|
| 63 |
-
Hidden Size 768
|
| 64 |
-
Attention Heads 12
|
| 65 |
-
Context Length 1024 Tokens
|
| 66 |
-
Vocabulary Size 16,384
|
| 67 |
-
Position Encoding RoPE
|
| 68 |
-
Normalization RMSNorm
|
| 69 |
-
Activation SwiGLU
|
| 70 |
-
Training Method From Scratch
|
| 71 |
|
| 72 |
-
|
|
|
|
|
|
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
-
|
|
|
|
|
|
|
| 77 |
|
| 78 |
-
|
| 79 |
|
| 80 |
-
|
|
|
|
|
|
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
- Technical English related to programming
|
| 88 |
|
| 89 |
-
|
| 90 |
|
| 91 |
-
|
|
|
|
|
|
|
| 92 |
|
| 93 |
-
|
| 94 |
|
| 95 |
-
##
|
| 96 |
|
| 97 |
-
|
| 98 |
|
| 99 |
-
-
|
| 100 |
-
- Programming patterns
|
| 101 |
-
- Code structure learning
|
| 102 |
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
-
|
| 106 |
-
- Duplicate filtering
|
| 107 |
-
- Generated code filtering
|
| 108 |
-
- Secret detection
|
| 109 |
-
- File size filtering
|
| 110 |
|
| 111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
|
| 113 |
-
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
|
| 119 |
-
|
| 120 |
|
| 121 |
-
|
|
|
|
|
|
|
| 122 |
|
| 123 |
-
|
| 124 |
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
- Generated code filtering
|
| 129 |
-
- Dataset quality checks
|
| 130 |
|
| 131 |
-
|
| 132 |
|
| 133 |
-
-
|
| 134 |
-
-
|
| 135 |
-
- Test samples: 793
|
| 136 |
|
| 137 |
-
---
|
| 138 |
|
| 139 |
-
#
|
| 140 |
|
| 141 |
-
|
| 142 |
|
| 143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
|
| 145 |
-
|
| 146 |
|
| 147 |
-
|
| 148 |
|
| 149 |
-
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
-
-
|
| 152 |
-
- Indentation
|
| 153 |
-
- Operators
|
| 154 |
-
- Function names
|
| 155 |
-
- Technical English
|
| 156 |
|
| 157 |
-
|
| 158 |
|
| 159 |
-
|
| 160 |
|
| 161 |
-
Training
|
| 162 |
|
| 163 |
-
-
|
| 164 |
-
-
|
| 165 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
|
| 167 |
-
|
| 168 |
-
consumer hardware.
|
| 169 |
|
| 170 |
-
---
|
| 171 |
|
| 172 |
-
# Intended
|
| 173 |
|
| 174 |
-
|
| 175 |
|
| 176 |
-
-
|
| 177 |
-
-
|
| 178 |
-
-
|
| 179 |
-
-
|
|
|
|
|
|
|
|
|
|
| 180 |
|
| 181 |
-
---
|
| 182 |
|
| 183 |
-
#
|
| 184 |
|
| 185 |
-
This model:
|
| 186 |
|
| 187 |
-
-
|
| 188 |
-
-
|
| 189 |
-
-
|
| 190 |
-
-
|
| 191 |
-
-
|
|
|
|
| 192 |
|
| 193 |
-
---
|
| 194 |
|
| 195 |
-
#
|
| 196 |
|
| 197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
|
| 199 |
-
|
| 200 |
-
|
|
| 201 |
-
└── JLCM
|
| 202 |
-
|
|
| 203 |
-
├── JLCM-Python-100M
|
| 204 |
-
├── JLCM-JavaScript
|
| 205 |
-
├── JLCM-Rust
|
| 206 |
-
├── JLCM-C++
|
| 207 |
-
└── Future language models
|
| 208 |
|
| 209 |
-
|
| 210 |
|
| 211 |
-
|
| 212 |
|
| 213 |
-
|
| 214 |
|
| 215 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 216 |
|
| 217 |
-
|
| 218 |
-
- Larger Python models
|
| 219 |
-
- More programming languages
|
| 220 |
-
- Better code evaluation
|
| 221 |
-
- Unit-test based training
|
| 222 |
|
| 223 |
-
-
|
| 224 |
|
| 225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
|
| 227 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
+
datasets:
|
| 7 |
+
- codeparrot/codeparrot-clean
|
| 8 |
+
- google-research-datasets/mbpp
|
| 9 |
tags:
|
| 10 |
+
- code
|
| 11 |
+
- python
|
| 12 |
+
- python-code
|
| 13 |
+
- code-generation
|
| 14 |
+
- code-completion
|
| 15 |
+
- causal-language-modeling
|
| 16 |
+
- decoder-only
|
| 17 |
+
- programming-language-model
|
| 18 |
+
- small-language-model
|
| 19 |
+
- from-scratch
|
| 20 |
+
- random-initialization
|
| 21 |
+
- custom-architecture
|
| 22 |
+
- custom-pytorch
|
| 23 |
+
- pytorch
|
| 24 |
+
- byte-level-bpe
|
| 25 |
+
- rope
|
| 26 |
+
- rmsnorm
|
| 27 |
+
- swiglu
|
| 28 |
+
- consumer-gpu
|
| 29 |
+
- rtx-3060
|
| 30 |
+
- research
|
| 31 |
+
- jumplander
|
| 32 |
+
- jl-code
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
<p align="center">
|
| 36 |
+
<a href="https://jumplander.org/en/home">
|
| 37 |
+
<img
|
| 38 |
+
src="https://cdn-avatars.huggingface.co/v1/production/uploads/69204763af796f2f22ad9f49/loC_Dutp1Rb4jHIlGsbkG.png"
|
| 39 |
+
width="150"
|
| 40 |
+
alt="JumpLander logo"
|
| 41 |
+
/>
|
| 42 |
+
</a>
|
| 43 |
+
</p>
|
| 44 |
+
|
| 45 |
+
<h1 align="center">JL-Code-Python-97M</h1>
|
| 46 |
+
|
| 47 |
+
<p align="center">
|
| 48 |
+
<strong>A compact Python-focused causal language model trained from random initialization by JumpLander.</strong>
|
| 49 |
+
</p>
|
| 50 |
+
|
| 51 |
+
<p align="center">
|
| 52 |
+
<a href="https://huggingface.co/jumplander/JL-Code-Python-97M">
|
| 53 |
+
<img src="https://img.shields.io/badge/Hugging%20Face-JL--Code--Python--97M-FFD21E?logo=huggingface&logoColor=000000" alt="Hugging Face model"/>
|
| 54 |
+
</a>
|
| 55 |
+
<a href="https://jumplander.org/en/home">
|
| 56 |
+
<img src="https://img.shields.io/badge/JumpLander-Official%20Website-819e2e" alt="JumpLander website"/>
|
| 57 |
+
</a>
|
| 58 |
+
<a href="https://huggingface.co/jumplander">
|
| 59 |
+
<img src="https://img.shields.io/badge/Organization-jumplander-4b5d2a" alt="JumpLander Hugging Face"/>
|
| 60 |
+
</a>
|
| 61 |
+
</p>
|
| 62 |
+
|
| 63 |
+
<p align="center">
|
| 64 |
+
<img src="https://img.shields.io/badge/Parameters-97.54M-28392b" alt="97.54M parameters"/>
|
| 65 |
+
<img src="https://img.shields.io/badge/Language-Python-3776AB?logo=python&logoColor=white" alt="Python"/>
|
| 66 |
+
<img src="https://img.shields.io/badge/Training-From%20Scratch-0c0c0e" alt="From scratch"/>
|
| 67 |
+
<img src="https://img.shields.io/badge/GPU-RTX%203060%2012GB-76B900?logo=nvidia&logoColor=white" alt="RTX 3060"/>
|
| 68 |
+
<img src="https://img.shields.io/badge/Release-v0.1--base-819e2e" alt="v0.1 base"/>
|
| 69 |
+
</p>
|
| 70 |
+
|
| 71 |
+
---
|
| 72 |
+
|
| 73 |
+
## Overview
|
| 74 |
+
|
| 75 |
+
**JL-Code-Python-97M** is an experimental, Python-specialized decoder-only language model developed by [JumpLander](https://jumplander.org/en/home).
|
| 76 |
+
|
| 77 |
+
The checkpoint contains exactly **97,536,768 trainable parameters**—approximately **97.54 million parameters**. It was trained from **randomly initialized weights** and does not inherit pretrained weights from Qwen, Llama, DeepSeek, Code Llama, GPT, or another external model family.
|
| 78 |
+
|
| 79 |
+
The release focuses on a narrow technical domain:
|
| 80 |
+
|
| 81 |
+
- Python source-code continuation
|
| 82 |
+
- Python function completion
|
| 83 |
+
- technical English associated with Python code
|
| 84 |
+
- docstring-to-code patterns
|
| 85 |
+
- short English-to-Python programming tasks
|
| 86 |
+
- fill-in-the-middle code reconstruction
|
| 87 |
+
|
| 88 |
+
This is a **base research checkpoint**, not a general chat model and not a production coding assistant.
|
| 89 |
+
|
| 90 |
+
> **Compatibility notice:** this release uses a custom PyTorch architecture and a custom `.pt` checkpoint. It is not currently loadable through `AutoModelForCausalLM.from_pretrained(...)`. Use the included [`jumplander_python_100m.py`](./jumplander_python_100m.py) file for loading and inference.
|
| 91 |
+
|
| 92 |
+
---
|
| 93 |
+
|
| 94 |
+
## JL-Code model family
|
| 95 |
+
|
| 96 |
+
`JL-Code` is JumpLander's language-specific code-model line. Each branch is intended to focus on one programming language rather than mixing every language into a single small checkpoint.
|
| 97 |
+
|
| 98 |
+
```text
|
| 99 |
+
JumpLander
|
| 100 |
+
└── JL-Code
|
| 101 |
+
├── JL-Code-Python-97M ← current release
|
| 102 |
+
├── JL-Code-JavaScript-* ← planned
|
| 103 |
+
├── JL-Code-PHP-* ← planned
|
| 104 |
+
├── JL-Code-Rust-* ← planned
|
| 105 |
+
├── JL-Code-C-* ← planned
|
| 106 |
+
├── JL-Code-Cpp-* ← planned
|
| 107 |
+
└── JL-Code-SQL-* ← planned
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
Planned names are directional and do not imply that those checkpoints have already been released.
|
| 111 |
+
|
| 112 |
+
---
|
| 113 |
+
|
| 114 |
+
## At a glance
|
| 115 |
+
|
| 116 |
+
| Property | Value |
|
| 117 |
+
|---|---|
|
| 118 |
+
| Repository | [`jumplander/JL-Code-Python-97M`](https://huggingface.co/jumplander/JL-Code-Python-97M) |
|
| 119 |
+
| Developer | [JumpLander](https://jumplander.org/en/home) |
|
| 120 |
+
| Model family | JL-Code |
|
| 121 |
+
| Release | `v0.1-base` |
|
| 122 |
+
| Status | Experimental research release |
|
| 123 |
+
| Primary domain | Python |
|
| 124 |
+
| Natural-language context | Technical English |
|
| 125 |
+
| Architecture | Custom decoder-only Transformer |
|
| 126 |
+
| Parameters | **97,536,768** |
|
| 127 |
+
| Initialization | Random initialization |
|
| 128 |
+
| External pretrained checkpoint | None |
|
| 129 |
+
| Context length | 1,024 tokens |
|
| 130 |
+
| Tokenizer | Custom Byte-Level BPE |
|
| 131 |
+
| Vocabulary | 16,384 tokens |
|
| 132 |
+
| Training objective | Causal language modeling |
|
| 133 |
+
| Framework | PyTorch |
|
| 134 |
+
| Training GPU | NVIDIA RTX 3060 12GB |
|
| 135 |
+
| Checkpoint format | Custom PyTorch training checkpoint (`.pt`) |
|
| 136 |
+
|
| 137 |
+
---
|
| 138 |
+
|
| 139 |
+
## Architecture
|
| 140 |
+
|
| 141 |
+
The model architecture is implemented in [`jumplander_python_100m.py`](./jumplander_python_100m.py).
|
| 142 |
+
|
| 143 |
+
| Component | Configuration |
|
| 144 |
+
|---|---:|
|
| 145 |
+
| Transformer blocks | 12 |
|
| 146 |
+
| Hidden dimension | 768 |
|
| 147 |
+
| Attention heads | 12 |
|
| 148 |
+
| Head dimension | 64 |
|
| 149 |
+
| Feed-forward dimension | 2,048 |
|
| 150 |
+
| Maximum sequence length | 1,024 |
|
| 151 |
+
| Vocabulary size | 16,384 |
|
| 152 |
+
| Position encoding | Rotary Position Embeddings (RoPE) |
|
| 153 |
+
| RoPE theta | 10,000 |
|
| 154 |
+
| Normalization | RMSNorm |
|
| 155 |
+
| RMSNorm epsilon | `1e-5` |
|
| 156 |
+
| MLP | SwiGLU |
|
| 157 |
+
| Attention | Causal self-attention |
|
| 158 |
+
| Attention implementation | PyTorch scaled dot-product attention |
|
| 159 |
+
| Attention/MLP bias | Disabled |
|
| 160 |
+
| Dropout | `0.0` |
|
| 161 |
+
| Input/output embedding tying | Enabled |
|
| 162 |
+
| Initialization standard deviation | `0.02` |
|
| 163 |
+
| Training gradient checkpointing | Enabled |
|
| 164 |
+
|
| 165 |
+
The exact machine-readable architecture is available in [`config.json`](./config.json).
|
| 166 |
+
|
| 167 |
+
### Parameter count
|
| 168 |
+
|
| 169 |
+
```text
|
| 170 |
+
97,536,768 trainable parameters
|
| 171 |
+
≈ 97.54M parameters
|
| 172 |
+
≈ 100M-class model
|
| 173 |
+
```
|
| 174 |
+
|
| 175 |
+
The repository name uses `97M` to reflect the exact architecture more honestly than rounding it up to 100M.
|
| 176 |
+
|
| 177 |
+
---
|
| 178 |
+
|
| 179 |
+
## Tokenizer
|
| 180 |
+
|
| 181 |
+
The tokenizer was trained specifically for this project from the prepared local training corpus.
|
| 182 |
+
|
| 183 |
+
| Property | Value |
|
| 184 |
+
|---|---|
|
| 185 |
+
| Algorithm | Byte-Level BPE |
|
| 186 |
+
| Vocabulary target | 16,384 |
|
| 187 |
+
| Minimum token frequency | 2 |
|
| 188 |
+
| Byte fallback | Enabled |
|
| 189 |
+
| Pre-tokenizer | ByteLevel |
|
| 190 |
+
| Decoder | ByteLevel |
|
| 191 |
+
|
| 192 |
+
Special tokens:
|
| 193 |
+
|
| 194 |
+
```text
|
| 195 |
+
<pad>
|
| 196 |
+
<unk>
|
| 197 |
+
<bos>
|
| 198 |
+
<eos>
|
| 199 |
+
<file_start>
|
| 200 |
+
<file_end>
|
| 201 |
+
<fim_prefix>
|
| 202 |
+
<fim_suffix>
|
| 203 |
+
<fim_middle>
|
| 204 |
+
<instruction>
|
| 205 |
+
<response>
|
| 206 |
+
```
|
| 207 |
+
|
| 208 |
+
The tokenizer file required for inference is [`tokenizer.json`](./tokenizer.json).
|
| 209 |
+
|
| 210 |
+
---
|
| 211 |
+
|
| 212 |
+
## Training data
|
| 213 |
+
|
| 214 |
+
The local data-building pipeline uses two public Hugging Face datasets.
|
| 215 |
+
|
| 216 |
+
### 1. CodeParrot Clean
|
| 217 |
+
|
| 218 |
+
- Dataset: [`codeparrot/codeparrot-clean`](https://huggingface.co/datasets/codeparrot/codeparrot-clean)
|
| 219 |
+
- Purpose: Python source-code pretraining and code-structure learning
|
| 220 |
+
- Source type: deduplicated Python files collected from public GitHub repositories
|
| 221 |
+
|
| 222 |
+
The upstream dataset includes per-file license metadata and contains code under multiple software licenses. Users should review the dataset card and original repository licenses before downstream commercial use.
|
| 223 |
+
|
| 224 |
+
### 2. MBPP
|
| 225 |
+
|
| 226 |
+
- Dataset: [`google-research-datasets/mbpp`](https://huggingface.co/datasets/google-research-datasets/mbpp)
|
| 227 |
+
- Alternate dataset card: [`Muennighoff/mbpp`](https://huggingface.co/datasets/Muennighoff/mbpp)
|
| 228 |
+
- Purpose: short technical-English-to-Python examples and held-out programming tasks
|
| 229 |
+
- Content: natural-language tasks, Python reference solutions, and automated tests
|
| 230 |
+
|
| 231 |
+
MBPP examples assigned to test or validation splits were kept outside the main training split by the project pipeline.
|
| 232 |
+
|
| 233 |
---
|
| 234 |
|
| 235 |
+
## Data preparation pipeline
|
| 236 |
+
|
| 237 |
+
The dataset was not passed directly into training. The local pipeline applied additional filtering and transformation:
|
| 238 |
+
|
| 239 |
+
1. stream Python records from Hugging Face;
|
| 240 |
+
2. normalize line endings and remove null bytes;
|
| 241 |
+
3. reject very short or oversized files;
|
| 242 |
+
4. detect likely credentials, keys, and private-key blocks;
|
| 243 |
+
5. reject generated or minified files;
|
| 244 |
+
6. validate Python using `ast.parse`;
|
| 245 |
+
7. split large source files at Python function/class boundaries where possible;
|
| 246 |
+
8. remove exact duplicates using SHA-256;
|
| 247 |
+
9. create deterministic train, validation, and test splits;
|
| 248 |
+
10. extract selected function/docstring pairs as English-to-Python instruction rows;
|
| 249 |
+
11. add MBPP examples according to their upstream split;
|
| 250 |
+
12. generate deterministic fill-in-the-middle variants for base training rows;
|
| 251 |
+
13. tokenize and pack the corpus into contiguous `uint16` token streams.
|
| 252 |
+
|
| 253 |
+
### Prepared dataset statistics
|
| 254 |
+
|
| 255 |
+
| Statistic | Count |
|
| 256 |
+
|---|---:|
|
| 257 |
+
| Accepted base samples | 20,000 |
|
| 258 |
+
| Final training rows | 35,855 |
|
| 259 |
+
| Final validation rows | 389 |
|
| 260 |
+
| Final test rows | 793 |
|
| 261 |
+
| Exact duplicates rejected | 391 |
|
| 262 |
+
| Generated files rejected | 246 |
|
| 263 |
+
| Secret-like samples rejected | 75 |
|
| 264 |
+
| Syntax-invalid samples rejected | 1,523 |
|
| 265 |
+
| Oversized samples rejected | 268 |
|
| 266 |
+
| Source records read | 10,809 |
|
| 267 |
+
|
| 268 |
+
A single accepted source file can produce more than one training row—for example, a base-code sample plus extracted function/docstring instruction samples. This is why the final training-row count is larger than the accepted-base-sample count.
|
| 269 |
|
| 270 |
+
---
|
| 271 |
|
| 272 |
+
## Training configuration
|
| 273 |
+
|
| 274 |
+
The model was trained using next-token prediction over packed token sequences.
|
| 275 |
+
|
| 276 |
+
| Setting | Value |
|
| 277 |
+
|---|---:|
|
| 278 |
+
| Optimizer | AdamW |
|
| 279 |
+
| Optimizer betas | `(0.9, 0.95)` |
|
| 280 |
+
| Optimizer epsilon | `1e-8` |
|
| 281 |
+
| Weight decay | `0.1` |
|
| 282 |
+
| Peak learning rate | `3e-4` |
|
| 283 |
+
| Minimum learning rate | `3e-5` |
|
| 284 |
+
| Scheduler | Cosine decay |
|
| 285 |
+
| Warmup | 200 optimizer steps |
|
| 286 |
+
| Total optimizer steps | 10,000 |
|
| 287 |
+
| Micro-batch size | 1 sequence |
|
| 288 |
+
| Gradient accumulation | 32 |
|
| 289 |
+
| Effective batch | 32 sequences |
|
| 290 |
+
| Sequence length | 1,024 tokens |
|
| 291 |
+
| Tokens per optimizer step | 32,768 |
|
| 292 |
+
| Approximate tokens processed | 327,680,000 |
|
| 293 |
+
| Gradient clipping | `1.0` |
|
| 294 |
+
| Evaluation interval | 250 steps |
|
| 295 |
+
| Checkpoint interval | 500 steps |
|
| 296 |
+
| Random seed | 1,337 |
|
| 297 |
+
| Precision | BF16 mixed precision |
|
| 298 |
+
| Hardware | NVIDIA RTX 3060 12GB |
|
| 299 |
+
|
| 300 |
+
Observed during training:
|
| 301 |
+
|
| 302 |
+
- approximately **8,400–9,000 tokens/second**;
|
| 303 |
+
- approximately **1.86 GB peak allocated VRAM** in the reported run;
|
| 304 |
+
- stable gradient norms during the observed training window.
|
| 305 |
+
|
| 306 |
+
The complete machine-readable run settings are in [`training_config.json`](./training_config.json).
|
| 307 |
|
| 308 |
+
---
|
|
|
|
|
|
|
| 309 |
|
| 310 |
+
## Repository files
|
| 311 |
+
|
| 312 |
+
Recommended repository layout:
|
| 313 |
+
|
| 314 |
+
```text
|
| 315 |
+
JL-Code-Python-97M/
|
| 316 |
+
├── README.md
|
| 317 |
+
├── config.json
|
| 318 |
+
├── training_config.json
|
| 319 |
+
├── jumplander_python_100m.pt
|
| 320 |
+
├── tokenizer.json
|
| 321 |
+
├── jumplander_python_100m.py
|
| 322 |
+
├── requirements.txt
|
| 323 |
+
└── DATA_SOURCES.md
|
| 324 |
+
```
|
| 325 |
+
|
| 326 |
+
| File | Purpose |
|
| 327 |
+
|---|---|
|
| 328 |
+
| [`README.md`](./README.md) | Hugging Face model card |
|
| 329 |
+
| [`config.json`](./config.json) | Machine-readable architecture description |
|
| 330 |
+
| [`training_config.json`](./training_config.json) | Training and data-preparation settings |
|
| 331 |
+
| [`jumplander_python_100m.pt`](./jumplander_python_100m.pt) | Trained model checkpoint |
|
| 332 |
+
| [`tokenizer.json`](./tokenizer.json) | Byte-Level BPE tokenizer |
|
| 333 |
+
| [`jumplander_python_100m.py`](./jumplander_python_100m.py) | Model architecture, loading, generation, and web UI |
|
| 334 |
+
| [`requirements.txt`](./requirements.txt) | Python dependencies |
|
| 335 |
+
| [`DATA_SOURCES.md`](./DATA_SOURCES.md) | Additional data provenance notes |
|
| 336 |
+
|
| 337 |
+
Do not upload `.venv`, `__pycache__`, Hugging Face caches, tokenized `.bin` training files, or private training logs unless they are intentionally part of the release.
|
| 338 |
|
| 339 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 340 |
|
| 341 |
+
## Download
|
| 342 |
|
| 343 |
+
### Hugging Face CLI
|
| 344 |
|
| 345 |
+
```bash
|
| 346 |
+
pip install -U huggingface_hub
|
| 347 |
+
hf download jumplander/JL-Code-Python-97M --local-dir JL-Code-Python-97M
|
| 348 |
+
cd JL-Code-Python-97M
|
| 349 |
+
```
|
| 350 |
|
| 351 |
+
### Git and Git LFS
|
| 352 |
|
| 353 |
+
```bash
|
| 354 |
+
git lfs install
|
| 355 |
+
git clone https://huggingface.co/jumplander/JL-Code-Python-97M
|
| 356 |
+
cd JL-Code-Python-97M
|
| 357 |
+
```
|
|
|
|
| 358 |
|
| 359 |
+
---
|
|
|
|
| 360 |
|
| 361 |
+
## Installation
|
| 362 |
|
| 363 |
+
```bash
|
| 364 |
+
python -m venv .venv
|
| 365 |
+
```
|
| 366 |
|
| 367 |
+
Windows PowerShell:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 368 |
|
| 369 |
+
```powershell
|
| 370 |
+
.\.venv\Scripts\Activate.ps1
|
| 371 |
+
```
|
| 372 |
|
| 373 |
+
Linux/macOS:
|
| 374 |
|
| 375 |
+
```bash
|
| 376 |
+
source .venv/bin/activate
|
| 377 |
+
```
|
| 378 |
|
| 379 |
+
Install dependencies:
|
| 380 |
|
| 381 |
+
```bash
|
| 382 |
+
pip install -r requirements.txt
|
| 383 |
+
```
|
| 384 |
|
| 385 |
+
Inspect the environment and local files:
|
| 386 |
|
| 387 |
+
```bash
|
| 388 |
+
python jumplander_python_100m.py check
|
| 389 |
+
```
|
|
|
|
| 390 |
|
| 391 |
+
Inspect the architecture and exact parameter count:
|
| 392 |
|
| 393 |
+
```bash
|
| 394 |
+
python jumplander_python_100m.py info
|
| 395 |
+
```
|
| 396 |
|
| 397 |
+
---
|
| 398 |
|
| 399 |
+
## Inference
|
| 400 |
|
| 401 |
+
### Terminal generation
|
| 402 |
|
| 403 |
+
Instruction-style prompt:
|
|
|
|
|
|
|
| 404 |
|
| 405 |
+
```bash
|
| 406 |
+
python jumplander_python_100m.py generate \
|
| 407 |
+
"Write a Python function that returns unique list items while preserving order."
|
| 408 |
+
```
|
| 409 |
|
| 410 |
+
Code completion:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 411 |
|
| 412 |
+
```bash
|
| 413 |
+
python jumplander_python_100m.py generate \
|
| 414 |
+
"def fibonacci(n):" \
|
| 415 |
+
--mode completion \
|
| 416 |
+
--max-new-tokens 160 \
|
| 417 |
+
--temperature 0.2 \
|
| 418 |
+
--top-p 0.95
|
| 419 |
+
```
|
| 420 |
|
| 421 |
+
Windows PowerShell single-line example:
|
| 422 |
|
| 423 |
+
```powershell
|
| 424 |
+
python jumplander_python_100m.py generate "Write a Python function that checks whether a number is prime."
|
| 425 |
+
```
|
| 426 |
|
| 427 |
+
### Local browser UI
|
| 428 |
|
| 429 |
+
```bash
|
| 430 |
+
python jumplander_python_100m.py chat
|
| 431 |
+
```
|
| 432 |
|
| 433 |
+
Default address:
|
| 434 |
|
| 435 |
+
```text
|
| 436 |
+
http://127.0.0.1:7860
|
| 437 |
+
```
|
|
|
|
|
|
|
| 438 |
|
| 439 |
+
The UI provides two modes:
|
| 440 |
|
| 441 |
+
- instruction-to-Python;
|
| 442 |
+
- Python code completion.
|
|
|
|
| 443 |
|
| 444 |
+
---
|
| 445 |
|
| 446 |
+
## Checkpoint format
|
| 447 |
|
| 448 |
+
`jumplander_python_100m.pt` is a custom PyTorch training checkpoint containing:
|
| 449 |
|
| 450 |
+
```text
|
| 451 |
+
model_name
|
| 452 |
+
model_config
|
| 453 |
+
train_config
|
| 454 |
+
model_state
|
| 455 |
+
optimizer_state
|
| 456 |
+
step
|
| 457 |
+
tokens_seen
|
| 458 |
+
saved_at
|
| 459 |
+
format_version
|
| 460 |
+
```
|
| 461 |
|
| 462 |
+
Because the checkpoint includes optimizer state, it can be larger than a weights-only release.
|
| 463 |
|
| 464 |
+
A future release should also provide:
|
| 465 |
|
| 466 |
+
- a weights-only checkpoint;
|
| 467 |
+
- `model.safetensors`;
|
| 468 |
+
- native Hugging Face Transformers integration;
|
| 469 |
+
- `AutoModelForCausalLM` loading support.
|
| 470 |
|
| 471 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 472 |
|
| 473 |
+
## Evaluation status
|
| 474 |
|
| 475 |
+
This release documents the completed training run, but it does **not yet claim a verified HumanEval, MBPP pass@1, or production code-generation score**.
|
| 476 |
|
| 477 |
+
Training loss alone does not establish code correctness. Proper evaluation should include:
|
| 478 |
|
| 479 |
+
- Python AST parse rate;
|
| 480 |
+
- executable completion rate;
|
| 481 |
+
- unit-test pass rate;
|
| 482 |
+
- MBPP pass@1 and pass@k;
|
| 483 |
+
- HumanEval evaluation after contamination review;
|
| 484 |
+
- repetition and memorization checks;
|
| 485 |
+
- security-oriented code review.
|
| 486 |
|
| 487 |
+
Until those evaluations are published, treat this checkpoint as an experimental base model.
|
|
|
|
| 488 |
|
| 489 |
+
---
|
| 490 |
|
| 491 |
+
## Intended uses
|
| 492 |
|
| 493 |
+
Appropriate uses:
|
| 494 |
|
| 495 |
+
- research on small code language models;
|
| 496 |
+
- experiments with Python code completion;
|
| 497 |
+
- educational study of from-scratch Transformer training;
|
| 498 |
+
- tokenizer and data-pipeline research;
|
| 499 |
+
- local inference experiments;
|
| 500 |
+
- continued pretraining and instruction tuning;
|
| 501 |
+
- analysis of consumer-GPU model development.
|
| 502 |
|
| 503 |
+
---
|
| 504 |
|
| 505 |
+
## Out-of-scope uses
|
| 506 |
|
| 507 |
+
This model is not intended for:
|
| 508 |
|
| 509 |
+
- production-critical code generation;
|
| 510 |
+
- security-sensitive implementation without review;
|
| 511 |
+
- autonomous deployment of generated code;
|
| 512 |
+
- legal, medical, financial, or safety-critical systems;
|
| 513 |
+
- generating or executing untrusted code without sandboxing;
|
| 514 |
+
- replacing human code review and automated testing.
|
| 515 |
|
| 516 |
+
---
|
| 517 |
|
| 518 |
+
## Limitations
|
| 519 |
|
| 520 |
+
- The model is small and narrowly trained.
|
| 521 |
+
- It has limited general-world knowledge.
|
| 522 |
+
- It may generate invalid, incomplete, insecure, or fabricated Python code.
|
| 523 |
+
- English understanding is primarily tied to technical programming patterns.
|
| 524 |
+
- The context window is limited to 1,024 tokens.
|
| 525 |
+
- The training corpus is much smaller than corpora used for leading code models.
|
| 526 |
+
- GitHub-derived data can contain bugs, insecure patterns, biases, or licensing constraints.
|
| 527 |
+
- The current architecture is custom and is not yet integrated with Transformers.
|
| 528 |
+
- Generated code must be reviewed, sandboxed, and tested before use.
|
| 529 |
|
| 530 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 531 |
|
| 532 |
+
## Safety and responsible use
|
| 533 |
|
| 534 |
+
Never execute generated code directly in a privileged environment.
|
| 535 |
|
| 536 |
+
Recommended controls:
|
| 537 |
|
| 538 |
+
1. run generated code in a restricted sandbox;
|
| 539 |
+
2. disable network access where possible;
|
| 540 |
+
3. apply CPU, memory, and execution-time limits;
|
| 541 |
+
4. scan generated code for secrets and unsafe operations;
|
| 542 |
+
5. require unit tests and human review;
|
| 543 |
+
6. avoid exposing private repositories or credentials to untrusted systems.
|
| 544 |
+
|
| 545 |
+
---
|
| 546 |
|
| 547 |
+
## Licensing and data notice
|
|
|
|
|
|
|
|
|
|
|
|
|
| 548 |
|
| 549 |
+
The repository declares the Apache License 2.0 for JumpLander-authored code and released model artifacts.
|
| 550 |
|
| 551 |
+
That license declaration does not replace or override the licenses attached to upstream source files used by the training datasets. `codeparrot/codeparrot-clean` includes per-file license metadata from many public repositories. Users are responsible for reviewing the upstream dataset cards, source-code licenses, attribution requirements, and applicable law before commercial or regulated use.
|
| 552 |
+
|
| 553 |
+
MBPP is commonly distributed under CC BY 4.0; consult the current dataset card for attribution and reuse requirements.
|
| 554 |
+
|
| 555 |
+
This section is informational and is not legal advice.
|
| 556 |
+
|
| 557 |
+
---
|
| 558 |
+
|
| 559 |
+
## Roadmap
|
| 560 |
+
|
| 561 |
+
Potential follow-up work:
|
| 562 |
+
|
| 563 |
+
- publish a weights-only `safetensors` checkpoint;
|
| 564 |
+
- add Transformers-compatible configuration and model classes;
|
| 565 |
+
- publish reproducible evaluation scripts;
|
| 566 |
+
- evaluate on MBPP and HumanEval;
|
| 567 |
+
- expand high-quality Python training data;
|
| 568 |
+
- create a stronger instruction-tuned Python variant;
|
| 569 |
+
- train larger Python-specific models;
|
| 570 |
+
- extend the JL-Code family to additional programming languages.
|
| 571 |
+
|
| 572 |
+
---
|
| 573 |
+
|
| 574 |
+
## Links
|
| 575 |
+
|
| 576 |
+
- **Model:** [huggingface.co/jumplander/JL-Code-Python-97M](https://huggingface.co/jumplander/JL-Code-Python-97M)
|
| 577 |
+
- **JumpLander on Hugging Face:** [huggingface.co/jumplander](https://huggingface.co/jumplander)
|
| 578 |
+
- **JumpLander website:** [jumplander.org](https://jumplander.org/en/home)
|
| 579 |
+
- **JumpLander documentation:** [jumplander.org/fa/docs](https://jumplander.org/fa/docs)
|
| 580 |
+
- **CodeParrot Clean:** [huggingface.co/datasets/codeparrot/codeparrot-clean](https://huggingface.co/datasets/codeparrot/codeparrot-clean)
|
| 581 |
+
- **MBPP:** [huggingface.co/datasets/google-research-datasets/mbpp](https://huggingface.co/datasets/google-research-datasets/mbpp)
|
| 582 |
+
|
| 583 |
+
---
|
| 584 |
+
|
| 585 |
+
## Citation
|
| 586 |
+
|
| 587 |
+
```bibtex
|
| 588 |
+
@misc{jumplander_jl_code_python_97m_2026,
|
| 589 |
+
author = {{JumpLander}},
|
| 590 |
+
title = {JL-Code-Python-97M: A From-Scratch Python Code Language Model},
|
| 591 |
+
year = {2026},
|
| 592 |
+
publisher = {Hugging Face},
|
| 593 |
+
howpublished = {\url{https://huggingface.co/jumplander/JL-Code-Python-97M}},
|
| 594 |
+
note = {Experimental base release, version 0.1}
|
| 595 |
+
}
|
| 596 |
+
```
|
| 597 |
+
|
| 598 |
+
---
|
| 599 |
+
|
| 600 |
+
## Acknowledgements
|
| 601 |
+
|
| 602 |
+
This project uses:
|
| 603 |
+
|
| 604 |
+
- [PyTorch](https://pytorch.org/) for model implementation and training;
|
| 605 |
+
- [Hugging Face Datasets](https://huggingface.co/docs/datasets/) for dataset access;
|
| 606 |
+
- [Hugging Face Tokenizers](https://huggingface.co/docs/tokenizers/) for Byte-Level BPE;
|
| 607 |
+
- [CodeParrot Clean](https://huggingface.co/datasets/codeparrot/codeparrot-clean) for Python source data;
|
| 608 |
+
- [MBPP](https://huggingface.co/datasets/google-research-datasets/mbpp) for English-to-Python programming tasks.
|
| 609 |
+
|
| 610 |
+
---
|
| 611 |
|
| 612 |
+
<p align="center">
|
| 613 |
+
Built by <a href="https://jumplander.org/en/home"><strong>JumpLander</strong></a>
|
| 614 |
+
· Programming intelligence, code models, datasets, and developer systems
|
| 615 |
+
</p>
|