Team Ai
Modelpublic

prav-974/bugfixer-deepseek-6.7b

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15downloads
Model Card

๐Ÿ› BugFixer-DeepSeek-6.7B

A Fine-Tuned Code Correction Model


๐Ÿ” Overview

BugFixer-DeepSeek-6.7B is a fine-tuned version of the base model DeepSeek-Coder-6.7B-Instruct designed to automatically detect and fix bugs in source code.

The model takes buggy code as input and outputs a corrected version without explanation, making it suitable for automation pipelines and IDE integrations.


๐Ÿง  Model Details

  • โ€”Base Model: deepseek-ai/deepseek-coder-6.7b-instruct
  • โ€”Model Type: Causal Language Model (Decoder-only Transformer)
  • โ€”Fine-tuning Method: LoRA (Low-Rank Adaptation)
  • โ€”Task: Code Refinement / Bug Fixing
  • โ€”Framework: Hugging Face Transformers
  • โ€”License: Same as base model (check DeepSeek license)

๐ŸŽฏ Intended Use

โœ… Direct Use

  • โ€”Fix Python bugs automatically
  • โ€”Code debugging assistant
  • โ€”Integration in:
  • โ€”VS Code extensions
  • โ€”CI/CD pipelines
  • โ€”AI coding assistants

๐Ÿ”„ Downstream Use

  • โ€”Code auto-repair systems
  • โ€”Educational tools (learning debugging)
  • โ€”Static analysis augmentation

โŒ Out-of-Scope Use

  • โ€”Not designed for:
  • โ€”Production-critical code validation
  • โ€”Security-sensitive systems
  • โ€”Non-code natural language tasks

๐Ÿ“Š Training Details

๐Ÿ“‚ Dataset

  • โ€”Dataset: CodeXGLUE โ€” Code Refinement
  • โ€”Contains:
  • โ€”Buggy code snippets
  • โ€”Corrected versions

โš™๏ธ Training Procedure

  • โ€”Hardware: Kaggle (2ร— T4 GPUs)
  • โ€”Precision: FP16
  • โ€”Method: LoRA fine-tuning
  • โ€”Epochs: 1
  • โ€”Batch Size: 1 (with gradient accumulation)
  • โ€”Max Sequence Length: 512

๐Ÿ”ง Hyperparameters

ParameterValue
Learning Rate2e-4
LoRA Rank (r)16
LoRA Alpha32
Dropout0.05
SchedulerCosine
Warmup3%

๐Ÿงช Evaluation

๐Ÿ“Œ Metrics Used

  • โ€”Training Loss
  • โ€”Qualitative Code Correctness

๐Ÿ“ˆ Observations

  • โ€”Strong performance on:
  • โ€”Syntax errors
  • โ€”Index errors
  • โ€”Simple logical bugs
  • โ€”Moderate performance on:
  • โ€”Complex algorithms
  • โ€”Multi-file dependencies

โš ๏ธ Limitations

  • โ€”Primarily trained on Python โ†’ weaker on other languages
  • โ€”May:
  • โ€”Produce partially correct fixes
  • โ€”Miss deep logical bugs
  • โ€”No guarantee of optimal or efficient solutions

โš ๏ธ Risks & Bias

  • โ€”Model may:
  • โ€”Introduce new bugs
  • โ€”Generate insecure code
  • โ€”Should always be reviewed by a developer

๐Ÿš€ Usage

๐Ÿ”น Load Model

python
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    "<your-username>/bugfixer-deepseek-6.7b",
    torch_dtype="auto",
    device_map="auto"
)

tokenizer = AutoTokenizer.from_pretrained(
    "<your-username>/bugfixer-deepseek-6.7b"
)

๐Ÿ”น Example

python
prompt = """### Instruction:
Fix the bug in the following code.

### Buggy Code:
def is_even(n):
    return n % 2 = 0

### Fixed Code:
"""

inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=100)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))

๐Ÿงฉ Model Variants

๐Ÿ”น Adapter Version

  • โ€”Repo: <your-username>/bugfixer-deepseek-6.7b-adapter
  • โ€”Requires base model

๐Ÿ”น Full Model

  • โ€”Repo: <your-username>/bugfixer-deepseek-6.7b
  • โ€”Fully merged and ready to use

๐ŸŒ Environmental Impact

  • โ€”Hardware: NVIDIA T4 ร—2
  • โ€”Platform: Kaggle
  • โ€”Estimated Duration: Few hours
  • โ€”Precision: FP16 (reduced energy vs FP32)

๐Ÿ—๏ธ Technical Architecture

  • โ€”Transformer-based decoder model
  • โ€”Self-attention layers
  • โ€”LoRA applied to:
  • โ€”Query (q_proj)
  • โ€”Key (k_proj)
  • โ€”Value (v_proj)
  • โ€”Output (o_proj)

๐Ÿ“š Citation

If you use this model, please cite:

bibtex
@misc{bugfixer_deepseek_6_7b,
  title={BugFixer-DeepSeek-6.7B},
  author={<your-name>},
  year={2026},
  note={Fine-tuned on CodeXGLUE dataset using LoRA}
}

๐Ÿ“ฌ Contact

  • โ€”Developer: praveen
  • โ€”Hugging Face: https://huggingface.co/prav-974

โญ Acknowledgements

  • โ€”DeepSeek AI for base model
  • โ€”Hugging Face for ecosystem
  • โ€”CodeXGLUE dataset contributors