Instructions to use ArmandS11/DeepSeekR1-7B-FineTuned-python with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ArmandS11/DeepSeekR1-7B-FineTuned-python with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("ArmandS11/DeepSeekR1-7B-FineTuned-python") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- MLX LM
How to use ArmandS11/DeepSeekR1-7B-FineTuned-python with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "ArmandS11/DeepSeekR1-7B-FineTuned-python" --prompt "Once upon a time"
File size: 2,307 Bytes
ea0f264 ee9e517 ea0f264 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | ---
license: mit
datasets:
- iamtarun/python_code_instructions_18k_alpaca
language:
- en
- fr
base_model:
- deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
pipeline_tag: text-generation
library_name: mlx
tags:
- code
- python
- deepseek
- fine-tuned
- lora
---
# DeepSeek-R1-Distill-Qwen-7B — Python Code Fine-tune
A LoRA fine-tuned version of [DeepSeek-R1-Distill-Qwen-7B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B) specialized for Python code generation.
## Model Details
### Model Description
- **Developed by:** Armand (@ArmanS11)
- **Model type:** Large Language Model — LoRA fine-tune
- **Language(s):** English
- **License:** MIT
- **Finetuned from:** [deepseek-ai/DeepSeek-R1-Distill-Qwen-7B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B)
### Model Sources
- **Base model:** https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
- **Training dataset:** https://huggingface.co/datasets/iamtarun/python_code_instructions_18k_alpaca
## Uses
### Direct Use
Generate Python code from natural language instructions. Examples:
- Writing functions, classes, algorithms
- Async/await patterns
- Data structures and error handling
### Out-of-Scope Use
- Not intended for other programming languages
- Not suitable for production security-critical code without review
## Bias, Risks, and Limitations
Generated code should always be reviewed before use in production. The model may occasionally produce syntactically incorrect code, particularly for complex async patterns.
## Training Details
### Training Data
[iamtarun/python_code_instructions_18k_alpaca](https://huggingface.co/datasets/iamtarun/python_code_instructions_18k_alpaca) — 18,612 Python code instruction/response pairs.
- **Train split:** 17,681 examples
- **Validation split:** 931 examples
### Training Hyperparameters
| Parameter | Value |
|---|---|
| Method | LoRA |
| LoRA Rank | 8 |
| LoRA Layers | 8 |
| Learning Rate | 5e-6 |
| Batch Size | 2 |
| Iterations | 2000 |
| Quantization | 4-bit |
## Technical Specifications
### Compute Infrastructure
#### Hardware
- Apple MacBook Pro M4 — 16 GB unified memory
#### Software
- MLX (Apple Silicon optimized)
- M-Courtyard fine-tuning app
## Model Card Authors
Armand — [@ArmandS11](https://huggingface.co/ArmandS11/) |