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
Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,227 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- code
|
| 8 |
+
- python
|
| 9 |
+
- code-generation
|
| 10 |
+
- programming-language-model
|
| 11 |
+
- transformer
|
| 12 |
+
- from-scratch
|
| 13 |
+
- jumplander
|
| 14 |
---
|
| 15 |
+
|
| 16 |
+
# JLCM-Python-100M-v0.1
|
| 17 |
+
|
| 18 |
+
## JumpLander Code Language Models
|
| 19 |
+
|
| 20 |
+
JLCM-Python-100M-v0.1 is an experimental Python-focused code language
|
| 21 |
+
model created by JumpLander.
|
| 22 |
+
|
| 23 |
+
This model is part of the **JumpLander Code Language Models (JLCM)**
|
| 24 |
+
family. The goal of this family is to build specialized models for
|
| 25 |
+
individual programming languages.
|
| 26 |
+
|
| 27 |
+
Examples of future models:
|
| 28 |
+
|
| 29 |
+
- JLCM-JavaScript
|
| 30 |
+
- JLCM-Rust
|
| 31 |
+
- JLCM-C++
|
| 32 |
+
- JLCM-PHP
|
| 33 |
+
- JLCM-SQL
|
| 34 |
+
|
| 35 |
+
------------------------------------------------------------------------
|
| 36 |
+
|
| 37 |
+
# Model Summary
|
| 38 |
+
|
| 39 |
+
JLCM-Python-100M is a decoder-only Transformer language model trained
|
| 40 |
+
from scratch for Python programming.
|
| 41 |
+
|
| 42 |
+
Key points:
|
| 43 |
+
|
| 44 |
+
- No pretrained weights were used.
|
| 45 |
+
- The model was initialized from random weights.
|
| 46 |
+
- The tokenizer was created specifically for this project.
|
| 47 |
+
- The training pipeline was built by JumpLander.
|
| 48 |
+
- The model focuses on Python code and technical English
|
| 49 |
+
understanding.
|
| 50 |
+
|
| 51 |
+
This is a research and experimental model, not a replacement for large
|
| 52 |
+
production coding models.
|
| 53 |
+
|
| 54 |
+
------------------------------------------------------------------------
|
| 55 |
+
|
| 56 |
+
# Architecture
|
| 57 |
+
|
| 58 |
+
Component Value
|
| 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 |
+
# Training
|
| 75 |
+
|
| 76 |
+
The model was trained using causal language modeling.
|
| 77 |
+
|
| 78 |
+
Training objective:
|
| 79 |
+
|
| 80 |
+
Predict the next token based on previous tokens.
|
| 81 |
+
|
| 82 |
+
The model learns:
|
| 83 |
+
|
| 84 |
+
- Python syntax
|
| 85 |
+
- Python functions
|
| 86 |
+
- Code completion patterns
|
| 87 |
+
- Technical English related to programming
|
| 88 |
+
|
| 89 |
+
------------------------------------------------------------------------
|
| 90 |
+
|
| 91 |
+
# Dataset
|
| 92 |
+
|
| 93 |
+
The training pipeline used Python-focused datasets.
|
| 94 |
+
|
| 95 |
+
## CodeParrot Clean
|
| 96 |
+
|
| 97 |
+
Used for:
|
| 98 |
+
|
| 99 |
+
- Real Python source code
|
| 100 |
+
- Programming patterns
|
| 101 |
+
- Code structure learning
|
| 102 |
+
|
| 103 |
+
Dataset processing:
|
| 104 |
+
|
| 105 |
+
- Syntax validation
|
| 106 |
+
- Duplicate filtering
|
| 107 |
+
- Generated code filtering
|
| 108 |
+
- Secret detection
|
| 109 |
+
- File size filtering
|
| 110 |
+
|
| 111 |
+
## MBPP
|
| 112 |
+
|
| 113 |
+
Used for:
|
| 114 |
+
|
| 115 |
+
- English-to-Python examples
|
| 116 |
+
- Function generation tasks
|
| 117 |
+
- Programming problem examples
|
| 118 |
+
|
| 119 |
+
------------------------------------------------------------------------
|
| 120 |
+
|
| 121 |
+
# Dataset Processing
|
| 122 |
+
|
| 123 |
+
The pipeline performs:
|
| 124 |
+
|
| 125 |
+
- Python AST validation
|
| 126 |
+
- Duplicate removal
|
| 127 |
+
- Secret filtering
|
| 128 |
+
- Generated code filtering
|
| 129 |
+
- Dataset quality checks
|
| 130 |
+
|
| 131 |
+
Final prepared dataset:
|
| 132 |
+
|
| 133 |
+
- Training samples: 35,855
|
| 134 |
+
- Validation samples: 389
|
| 135 |
+
- Test samples: 793
|
| 136 |
+
|
| 137 |
+
------------------------------------------------------------------------
|
| 138 |
+
|
| 139 |
+
# Tokenizer
|
| 140 |
+
|
| 141 |
+
Tokenizer:
|
| 142 |
+
|
| 143 |
+
Byte-Level BPE
|
| 144 |
+
|
| 145 |
+
Vocabulary:
|
| 146 |
+
|
| 147 |
+
16,384 tokens
|
| 148 |
+
|
| 149 |
+
Optimized for:
|
| 150 |
+
|
| 151 |
+
- Python keywords
|
| 152 |
+
- Indentation
|
| 153 |
+
- Operators
|
| 154 |
+
- Function names
|
| 155 |
+
- Technical English
|
| 156 |
+
|
| 157 |
+
------------------------------------------------------------------------
|
| 158 |
+
|
| 159 |
+
# Hardware
|
| 160 |
+
|
| 161 |
+
Training hardware:
|
| 162 |
+
|
| 163 |
+
- NVIDIA RTX 3060 12GB
|
| 164 |
+
- PyTorch
|
| 165 |
+
- Mixed Precision Training
|
| 166 |
+
|
| 167 |
+
The project demonstrates training a small specialized code model on
|
| 168 |
+
consumer hardware.
|
| 169 |
+
|
| 170 |
+
------------------------------------------------------------------------
|
| 171 |
+
|
| 172 |
+
# Intended Use
|
| 173 |
+
|
| 174 |
+
Suitable for:
|
| 175 |
+
|
| 176 |
+
- Python code generation experiments
|
| 177 |
+
- Code completion research
|
| 178 |
+
- Local AI coding experiments
|
| 179 |
+
- Educational model training research
|
| 180 |
+
|
| 181 |
+
------------------------------------------------------------------------
|
| 182 |
+
|
| 183 |
+
# Limitations
|
| 184 |
+
|
| 185 |
+
This model:
|
| 186 |
+
|
| 187 |
+
- Is a small language model.
|
| 188 |
+
- Can generate incorrect code.
|
| 189 |
+
- Does not guarantee executable solutions.
|
| 190 |
+
- Is not designed for production-critical software.
|
| 191 |
+
- Has limited general knowledge.
|
| 192 |
+
|
| 193 |
+
------------------------------------------------------------------------
|
| 194 |
+
|
| 195 |
+
# Model Family
|
| 196 |
+
|
| 197 |
+
JumpLander Code Language Models:
|
| 198 |
+
|
| 199 |
+
JumpLander
|
| 200 |
+
|
|
| 201 |
+
βββ JLCM
|
| 202 |
+
|
|
| 203 |
+
βββ JLCM-Python-100M
|
| 204 |
+
βββ JLCM-JavaScript
|
| 205 |
+
βββ JLCM-Rust
|
| 206 |
+
βββ JLCM-C++
|
| 207 |
+
βββ Future language models
|
| 208 |
+
|
| 209 |
+
Each model focuses on one programming language.
|
| 210 |
+
|
| 211 |
+
------------------------------------------------------------------------
|
| 212 |
+
|
| 213 |
+
# Future Work
|
| 214 |
+
|
| 215 |
+
Planned:
|
| 216 |
+
|
| 217 |
+
- Instruction tuning
|
| 218 |
+
- Larger Python models
|
| 219 |
+
- More programming languages
|
| 220 |
+
- Better code evaluation
|
| 221 |
+
- Unit-test based training
|
| 222 |
+
|
| 223 |
+
------------------------------------------------------------------------
|
| 224 |
+
|
| 225 |
+
# Created by
|
| 226 |
+
|
| 227 |
+
JumpLander AI Research
|