Instructions to use Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-6.7b-instruct") model = PeftModel.from_pretrained(base_model, "Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke") - Transformers
How to use Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke
- SGLang
How to use Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke with Docker Model Runner:
docker model run hf.co/Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke
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
- Base model: DeepSeek-Coder 6.7B Instruct.
- Training dataset: NVIDIA OpenCodeInstruct, released by NVIDIA under Creative Commons Attribution 4.0 (CC BY 4.0).
- Training scripts: GitHub project.
- Base-model use remains subject to the DeepSeek Model License. This model-card metadata does not relicense the base model or dataset.
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
Model tree for Biraj999/deepseek-coder-6.7b-opencodeinstruct-lora-t4-smoke
Base model
deepseek-ai/deepseek-coder-6.7b-instruct