Text Generation
PEFT
Safetensors
PyTorch
llama
lora
code-generation
neural-architecture-search
delta-nas
conversational
Run this model with HF Jobs
Run ABrain/Delta-NAS-DeepSeek-Coder-7B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ABrain/Delta-NAS-DeepSeek-Coder-7B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ABrain/Delta-NAS-DeepSeek-Coder-7B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/ABrain/Delta-NAS-DeepSeek-Coder-7B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/ABrain/Delta-NAS-DeepSeek-Coder-7B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use ABrain/Delta-NAS-DeepSeek-Coder-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ABrain/Delta-NAS-DeepSeek-Coder-7B with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-7b-instruct-v1.5") model = PeftModel.from_pretrained(base_model, "ABrain/Delta-NAS-DeepSeek-Coder-7B") - Notebooks
- Google Colab
- Kaggle
Add Delta-NAS fine-tuned LoRA adapter (22 cycles)
Browse filesFiles changed (3)
- README.mdAdded+95
- adapter_config.jsonAdded+74
- adapter_model.safetensorsAdded+3
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495---base_model: deepseek-ai/deepseek-coder-7b-instruct-v1.5library_name: peftlicense: mitpipeline_tag: text-generationtags:- lora- code-generation- neural-architecture-search- delta-nas- pytorch---
# Delta-NAS DeepSeek-Coder-7B-Instruct LoRA Adapter
This is a LoRA adapter for [DeepSeek-Coder-7B-Instruct-v1.5](https://huggingface.co/deepseek-ai/deepseek-coder-7b-instruct-v1.5), fine-tuned for **delta-based Neural Architecture Search (NAS)** — generating novel PyTorch image-classification architectures via unified code diffs.
## Model Description
This adapter is the result of 22 iterative fine-tuning cycles on the delta-NAS pipeline described in **"Delta-Based Neural Architecture Search: LLM Fine-Tuning via Code Diffs"**. The model generates unified diffs that modify a baseline neural network architecture to produce new, functional PyTorch models.
### Training Details
- **Base model**: `deepseek-ai/deepseek-coder-7b-instruct-v1.5`- **Fine-tuning method**: LoRA (Low-Rank Adaptation)- **LoRA rank (r)**: 32- **LoRA alpha**: 32- **LoRA dropout**: 0.05- **Target modules**: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, lm_head- **Training cycles**: 22 (iterative self-improvement)- **Total trained candidates**: 828- **Admitted novel architectures**: 83 (MinHash-Jaccard novelty filter + τ_acc ≥ 0.40)
### Evaluation Datasets
Models were evaluated on 6 LEMUR image-classification benchmarks:- CIFAR-10, CIFAR-100, MNIST, SVHN, ImageNette, CelebA-Gender
### Key Results
| Metric | Value ||--------|-------|| Trained candidates | 828 || Valid rate (compiles + trains) | 49.5% || Mean 1-epoch accuracy | 33.9% (±7.9% SD across cycles) || ≥40% accuracy rate | 16.6% || Novel architectures admitted to LEMUR | 83 |
## Usage
```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizerfrom peft import PeftModel
# Load base modelbase_model = AutoModelForCausalLM.from_pretrained( "deepseek-ai/deepseek-coder-7b-instruct-v1.5", torch_dtype="auto", device_map="auto")tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-7b-instruct-v1.5")
# Load LoRA adaptermodel = PeftModel.from_pretrained(base_model, "ABrain/Delta-NAS-DeepSeek-Coder-7B")
# Generate a diff to modify a baseline architectureprompt = """Given the following PyTorch neural network baseline:[baseline code here]
Generate a unified diff that creates a novel architecture variant."""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)outputs = model.generate(**inputs, max_new_tokens=512)print(tokenizer.decode(outputs[0], skip_special_tokens=True))```
## Associated Resources
- **Code**: [ABrain-One/nn-gpt](https://github.com/ABrain-One/nn-gpt)- **Generated models**: [ABrain-One/nn-dataset PR #204](https://github.com/ABrain-One/nn-dataset/pull/204) (197 del-* prefixed architectures)- **Paper**: "Delta-Based Neural Architecture Search: LLM Fine-Tuning via Code Diffs" (submitted to CVPR 2026)
## Citation
```bibtex@article{deltanas2026, title={Delta-Based Neural Architecture Search: LLM Fine-Tuning via Code Diffs}, author={Adhikari, Santosh and Ignatov, Dmitry}, year={2026}}```
## License
MIT License (same as the base model and LEMUR dataset)1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374{ "alora_invocation_tokens": null, "alpha_pattern": {}, "arrow_config": null, "auto_mapping": null, "base_model_name_or_path": "deepseek-ai/deepseek-coder-7b-instruct-v1.5", "bias": "none", "corda_config": null, "ensure_weight_tying": false, "eva_config": null, "exclude_modules": null, "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layer_replication": null, "layers_pattern": null, "layers_to_transform": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ], "loftq_config": {}, "lora_alpha": 32, "lora_bias": false, "lora_dropout": 0.05, "lora_ga_config": null, "megatron_config": null, "megatron_core": "megatron.core", "modules_to_save": null, "peft_type": "LORA", "peft_version": "0.19.0", "qalora_group_size": 16, "r": 32, "rank_pattern": {}, "revision": null, "target_modules": [ "up_proj", "lm_head", "gate_proj", "o_proj", "k_proj", "v_proj", "down_proj", "q_proj" ], "target_parameters": null, "task_type": "CAUSAL_LM", "trainable_token_indices": null, "use_bdlora": null, "use_dora": false, "use_qalora": false, "use_rslora": false}123version https://git-lfs.github.com/spec/v1oid sha256:6d9757f113952f89efa6eee54ff1c32fa59cbdad92948815defbfec57f0977a4size 1931261344README.mdAdded+95
adapter_config.jsonAdded+74
adapter_model.safetensorsAdded+3