mmbers-small & base
code and repository context evaluation
2 min read
A set of two fully fine-tuned regressors based on mmBERT (140M and 307M parameters) that evaluate visible repository source text across five continuous scales from 0 to 5. The models predict pretraining value, repository quality, coding standards, difficulty, and educational value based on teacher labeling from Qwen3.8-27B. They work directly with text and code, processing long contexts via token pooling without needing to download the entire project. This tool is useful for developers and researchers to quickly filter and label code datasets.
Key features
- Base models: built on jhu-clsp/mmBERT-small and mmBERT-base
- Five metrics: evaluate pretraining_value, repo_quality, coding_standard, difficulty, and educational_value
- Long context: supports fragments up to 8192 tokens with weighted averaging over non-empty tokens
- Transformers integration: standard Hugging Face interface via the predict method
What you can do
- Dataset filtering: automatically evaluate the quality and value of a codebase for training other language models
- Code analysis: quickly check individual files or fragments for compliance with coding standards and difficulty level
- Research: use regressor predictions for experiments with source code organization
Example
Example of model inference for evaluating a code fragment via Transformers:
import torch
from transformers import AutoModel, AutoTokenizer
repo_id = "Machacini/stackifiers-repo"
revision = "mmbert-small"
tokenizer = AutoTokenizer.from_pretrained(repo_id, revision=revision)
model = AutoModel.from_pretrained(
repo_id,
revision=revision,
trust_remote_code=True,
).to("cuda" if torch.cuda.is_available() else "cpu").eval()
text = """Repository: example/calculator
File: calculator.py
def add(a, b):
return a + b
"""
scores = model.predict(text, tokenizer=tokenizer, chunk_batch_size=4)
print(scores)
Read more
DetailsBenchmarks on 26,754 test contexts: mmbert-small (MAE: 0.327, RMSE: 0.557), mmbert-base (MAE: 0.319, RMSE: 0.546)
Training: 470,690 contexts based on a dataset of 524,288 examples
Weights exported in FP32 format without quantization
License: MIT










Comments