How to use from
Docker Model Runner
docker model run hf.co/Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke
Quick Links

DeepSeek-Coder 6.7B × OpenCodeInstruct — T4 LoRA (smoke test)

This repository contains LoRA adapter weights only, not the full base model. The adapter must be loaded on top of deepseek-ai/deepseek-coder-6.7b-instruct.

Experimental training checkpoint: 2 optimizer steps on 48 training examples and 8 validation examples. No independent code-generation benchmark or comparison with the base model has been performed. Do not interpret token accuracy as a pass rate on programming problems.

Provenance and attribution

Training configuration

Parameter Value
Base model deepseek-ai/deepseek-coder-6.7b-instruct
Dataset nvidia/OpenCodeInstruct
Hardware Tesla T4 (14.6 GiB VRAM)
Method 4-bit NF4 QLoRA
LoRA rank / alpha / dropout 16 / 32 / 0.05
Sequence length 512
Learning rate 0.0002
Training steps 2
Training examples 48
Validation examples 8
Saved LoRA tensors 448

Reported small-sample metrics

Metric Value
Training loss 0.2775
Validation loss 0.3425
Validation mean token accuracy 90.03%

Validation metrics are based on just 8 examples and are not an evaluation of coding task correctness, generalization, or quality.

Loading the adapter on a T4 GPU

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel

base_id = "deepseek-ai/deepseek-coder-6.7b-instruct"
adapter_id = "Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke"
quant = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_use_double_quant=True,
    bnb_4bit_compute_dtype=torch.float16,
)
base = AutoModelForCausalLM.from_pretrained(
    base_id, device_map="auto", quantization_config=quant,
    torch_dtype=torch.float16,
)
model = PeftModel.from_pretrained(base, adapter_id).eval()
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
prompt = [{"role": "user", "content": "Write a Python binary search function with tests."}]
input_ids = tokenizer.apply_chat_template(
    prompt, add_generation_prompt=True, return_tensors="pt"
).to("cuda")
with torch.no_grad():
    output = model.generate(input_ids, max_new_tokens=256, do_sample=False,
                            pad_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(output[0][input_ids.shape[-1]:], skip_special_tokens=True))

Risks and limitations

  • This is a proof-of-pipeline release, not a validated performance improvement.
  • Generated code may be incorrect, insecure, or incomplete; run tests in an isolated sandbox.
  • Training data attribution: NVIDIA, OpenCodeInstruct, CC BY 4.0.
  • Full-base-model weights are not included. Use of the model is subject to the original license.
Downloads last month
31
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke

Adapter
(391)
this model

Dataset used to train Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke