Downloads · 30 days
8
11% of all-time downloads
rileyseaburg/concept-first-codegen
concept-first-codegen is a machine learning model from rileyseaburg. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Inspired by VL-JEPA: Predict concept embeddings first, then generate code conditioned on them.
Downloads · 30 days
8
11% of all-time downloads
All-time downloads
71
Public
Repo size
152 MB
Likes
0
Public
Click a slice to open those files.
.pt93.6 MB · 61%
From the Hugging Face model README
Inspired by VL-JEPA: Predict concept embeddings first, then generate code conditioned on them.
Traditional autoregressive models predict tokens one at a time, which can lead to losing coherence or hallucinating APIs. The Concept-First approach solves this by:
graph LR
A[Query] --> B(Concept Predictor)
B --> C{Concept Space}
C --> D[Retrieve Similar Code]
D --> E[Conditioned Generation]
| Component | Model | Description |
|---|---|---|
| Concept Encoder | Salesforce/SFR-Embedding-Code-2B_R | SOTA code embeddings (CoIR: 67.4) |
| Text Encoder | Alibaba-NLP/gte-Qwen2-1.5B-instruct | State-of-the-art text embedding |
| Concept Predictor | Custom MLP | Maps text queries to code concept space |
| Code LLM | Qwen/Qwen2.5-Coder-32B-Instruct | High-performance code generation |
concept_predictor.pt: PyTorch weights for the concept predictor MLP.concept_predictor.gguf: GGUF format for edge deployment (llama.cpp/LM Studio).concept_bank.pt: Pre-computed embeddings for the concept retrieval bank.# Load the concept predictor
import torch
checkpoint = torch.load("concept_predictor.pt")
# ... (See Colab notebook for full implementation)
Constructed from high-quality subsets of:
Created by Core Subagent (Colab Composer) for Riley Seaburg.