Supernova-Atom-Developer
ATOM β Autonomous Trained Optimized Machine
An experimental multilingual code-focused base language model developed by Supernova AI and Software Foundations.
Supernova-Atom-Developer is a compact, decoder-only, causal language model trained to learn programming-language patterns and predict subsequent tokens in code sequences.
With approximately 8.9 million parameters, ATOM is an experimental research project exploring small-scale multilingual programming-language modeling.
It is a base pretrained model. It has not undergone instruction fine-tuning (SFT).
Model Overview
Property| Value Model name| Supernova-Atom-Developer Architecture| Decoder-only Transformer Model category| Base pretrained model Parameters| 8,916,224 Parameter size| 8.916M Hidden dimension| 256 Transformer layers| 6 Attention heads| 8 Head dimension| 32 Intermediate dimension| 704 Vocabulary size| 16,000 Maximum context length| 512 tokens Position encoding| Rotary Position Embeddings (RoPE) Normalization| RMSNorm Feed-forward network| SwiGLU Attention| Causal multi-head self-attention Embeddings| Tied input/output embeddings Tokenizer| Byte-Level BPE
Supported Programming Languages and Query Languages
The training corpus contains code examples from 13 categories:
- Rust
- TypeScript
- Python
- JavaScript
- Julia
- Bash
- C#
- Ruby
- Java
- Go
- C++
- SQL
- Cypher
This includes 11 general-purpose programming languages and two database query languages.
The model learns statistical patterns from these categories. Their inclusion does not guarantee equal performance across all languages.
Training Information
Dataset
The model was trained using extracted code samples from:
"nampdn-ai/tiny-codes"
The original dataset contains approximately 1.63 million rows.
The preprocessing pipeline extracted fenced code blocks from the dataset's "response" field.
Training data statistics:
Metric| Count Original dataset rows| 1,632,309 Extracted code samples| 1,183,440 Training samples| 1,159,771 Validation samples| 23,669 Training tokens| 314,399,436 Validation tokens| 6,404,566
The dataset was split into 98% training and 2% validation data using random seed 42.
Tokenizer
ATOM uses a Byte-Level BPE tokenizer.
Property| Value Vocabulary size| 16,000 PAD token ID| 0 UNK token ID| 1 BOS token ID| 2 EOS token ID| 3
Round-trip decoding tests were performed to check preservation of code text, including newlines and indentation.
Pretraining Configuration
Setting| Value Training steps| 19,000 Effective batch size| 32 Microbatch size| 8 Gradient accumulation| 4 Sequence length| 512 Tokens per optimizer step| 16,384 Initial learning rate| 0.0003 Minimum learning rate| 0.00003 Warmup steps| 500 Optimizer| AdamW Weight decay| 0.1 Training precision| FP16 mixed precision Hardware| NVIDIA T4 GPU
Total tokens processed during training:
311,296,000 tokens
Evaluation Results
The base model underwent an initial validation and generation evaluation.
Evaluation metric| Result Validation windows| 1,000 Evaluated tokens| 512,000 Best training validation loss| 1.5633 Evaluation validation loss| 1.5691 Evaluation perplexity| 4.8023
The evaluation loss was slightly different from the best training validation loss because the evaluation used a separate set of validation windows.
Initial Generation Observations
Initial generation tests demonstrated that ATOM can produce recognizable programming-language structures, including functions, SQL clauses, declarations, comments, and other code patterns.
However, these tests also revealed important limitations:
- Some continuations are unrelated to the supplied code prefix.
- Some generated code mixes syntax from different programming languages.
- Some outputs contain duplicated statements or variable names.
- Some outputs contain incorrect operations or inconsistent logic.
- Some SQL outputs contain invalid joins, duplicate aliases, or incomplete statements.
ATOM can produce good-looking code structures and recognizable syntax, but it does not consistently produce logically correct or executable code.
These observations come from preliminary generation examples, not comprehensive language-specific benchmarks.
Intended Uses
Supernova-Atom-Developer is intended for:
- Research into compact language models.
- Programming-language modeling experiments.
- Causal code-completion research.
- Studying next-token prediction on source code.
- Educational experiments with decoder-only Transformers.
- Exploring multilingual code representations.
- Future model-development research.
Limitations and Responsible Use
This model is experimental and should not be treated as a production-ready coding assistant.
It is important to understand that:
- Recognizable syntax does not guarantee correct logic.
- Generated code may contain syntax errors.
- Generated SQL may fail to execute.
- The model may switch between programming-language patterns.
- The model may produce irrelevant or repetitive continuations.
- It does not reliably follow natural-language instructions.
Always review, test, and validate generated code before using it.
Do not use its outputs in production systems without appropriate human review and testing.
Installation
Install the required packages: '''python pip install torch tokenizers huggingface_hub ''' Download the Model
from huggingface_hub import snapshot_download
model_dir = snapshot_download( repo_id="Supernovallc/Supernova-Atom-Developer" )
print("Model downloaded to:", model_dir)
Load the Model
The repository contains:
- "best_model.pt" β pretrained model weights.
- "config.json" β model configuration.
- "tokenizer.json" β tokenizer definition.
- "tokenizer_config.json" β tokenizer configuration.
- "modeling_atom.py" β model architecture implementation.
Load the architecture and checkpoint:
import torch import sys from pathlib import Path from tokenizers import Tokenizer from huggingface_hub import snapshot_download
model_dir = Path( snapshot_download( repo_id="Supernovallc/Supernova-Atom-Developer" ) )
sys.path.insert(0, str(model_dir))
from modeling_atom import SupernovaTinyArcDeveloper
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = Tokenizer.from_file( str(model_dir / "tokenizer.json") )
model = SupernovaTinyArcDeveloper()
state_dict = torch.load( model_dir / "best_model.pt", map_location="cpu", weights_only=True )
model.load_state_dict(state_dict, strict=True)
model.to(device) model.eval()
print("Supernova-Atom-Developer loaded successfully.") print("Parameters:", sum(p.numel() for p in model.parameters()))
Code Generation Example
ATOM is a causal base model. It predicts subsequent tokens from a supplied code prefix.
It is not designed to interpret natural-language instructions as a chat assistant would.
Example:
import torch
prompt = "def factorial(n):\n"
encoded = tokenizer.encode(prompt)
input_ids = torch.tensor( [encoded.ids], dtype=torch.long, device=device )
eos_id = tokenizer.token_to_id("[EOS]")
temperature = 0.8 top_k = 50 max_new_tokens = 120
with torch.no_grad(): for _ in range(max_new_tokens):
context = input_ids[:, -512:]
logits = model(context)
next_logits = logits[:, -1, :]
next_logits = next_logits / temperature
values, indices = torch.topk(
next_logits,
k=min(top_k, next_logits.shape[-1]),
dim=-1
)
probabilities = torch.softmax(
values,
dim=-1
)
selected = torch.multinomial(
probabilities,
num_samples=1
)
next_token = indices.gather(
-1,
selected
)
input_ids = torch.cat(
[input_ids, next_token],
dim=1
)
if eos_id is not None and next_token.item() == eos_id:
break
generated_text = tokenizer.decode( input_ids[0].tolist() )
print(generated_text)
The output is an experimental continuation. It may not be syntactically or logically correct.
Repository Files
File| Description "best_model.pt"| Best pretrained model checkpoint "config.json"| Model configuration "tokenizer.json"| BPE tokenizer "tokenizer_config.json"| Tokenizer configuration "modeling_atom.py"| PyTorch model architecture "README.md"| Documentation
Project Information
Project: Supernova-Atom-Developer Full form: ATOM β Autonomous Trained Optimized Machine Developer: Supernova AI and Software Foundations Model type: Experimental base pretrained model Parameters: 8.916 million
Developed as part of Supernova's research into accessible, compact, and open language-model development.
License
This repository is distributed under the Apache License 2.0.
See the repository's "LICENSE" file for the complete license text.
Supernova AI and Software Foundations
Building experimental AI and software technologies through open development and research.
- Downloads last month
- 176