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"
Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,16 +1,73 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DeepSeek-R1-Distill-Qwen-7B — Python Code Fine-tune
|
| 2 |
+
|
| 3 |
+
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.
|
| 4 |
+
|
| 5 |
+
## Model Details
|
| 6 |
+
|
| 7 |
+
### Model Description
|
| 8 |
+
|
| 9 |
+
- **Developed by:** Armand (@ArmanS11)
|
| 10 |
+
- **Model type:** Large Language Model — LoRA fine-tune
|
| 11 |
+
- **Language(s):** English
|
| 12 |
+
- **License:** MIT
|
| 13 |
+
- **Finetuned from:** [deepseek-ai/DeepSeek-R1-Distill-Qwen-7B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B)
|
| 14 |
+
|
| 15 |
+
### Model Sources
|
| 16 |
+
|
| 17 |
+
- **Base model:** https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
|
| 18 |
+
- **Training dataset:** https://huggingface.co/datasets/iamtarun/python_code_instructions_18k_alpaca
|
| 19 |
+
|
| 20 |
+
## Uses
|
| 21 |
+
|
| 22 |
+
### Direct Use
|
| 23 |
+
|
| 24 |
+
Generate Python code from natural language instructions. Examples:
|
| 25 |
+
- Writing functions, classes, algorithms
|
| 26 |
+
- Async/await patterns
|
| 27 |
+
- Data structures and error handling
|
| 28 |
+
|
| 29 |
+
### Out-of-Scope Use
|
| 30 |
+
|
| 31 |
+
- Not intended for other programming languages
|
| 32 |
+
- Not suitable for production security-critical code without review
|
| 33 |
+
|
| 34 |
+
## Bias, Risks, and Limitations
|
| 35 |
+
|
| 36 |
+
Generated code should always be reviewed before use in production. The model may occasionally produce syntactically incorrect code, particularly for complex async patterns.
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
## Training Details
|
| 40 |
+
|
| 41 |
+
### Training Data
|
| 42 |
+
|
| 43 |
+
[iamtarun/python_code_instructions_18k_alpaca](https://huggingface.co/datasets/iamtarun/python_code_instructions_18k_alpaca) — 18,612 Python code instruction/response pairs.
|
| 44 |
+
|
| 45 |
+
- **Train split:** 17,681 examples
|
| 46 |
+
- **Validation split:** 931 examples
|
| 47 |
+
|
| 48 |
+
### Training Hyperparameters
|
| 49 |
+
|
| 50 |
+
| Parameter | Value |
|
| 51 |
+
|---|---|
|
| 52 |
+
| Method | LoRA |
|
| 53 |
+
| LoRA Rank | 8 |
|
| 54 |
+
| LoRA Layers | 8 |
|
| 55 |
+
| Learning Rate | 5e-6 |
|
| 56 |
+
| Batch Size | 2 |
|
| 57 |
+
| Iterations | 2000 |
|
| 58 |
+
| Quantization | 4-bit |
|
| 59 |
+
|
| 60 |
+
## Technical Specifications
|
| 61 |
+
|
| 62 |
+
### Compute Infrastructure
|
| 63 |
+
|
| 64 |
+
#### Hardware
|
| 65 |
+
- Apple MacBook Pro M4 — 16 GB unified memory
|
| 66 |
+
|
| 67 |
+
#### Software
|
| 68 |
+
- MLX (Apple Silicon optimized)
|
| 69 |
+
- M-Courtyard fine-tuning app
|
| 70 |
+
|
| 71 |
+
## Model Card Authors
|
| 72 |
+
|
| 73 |
+
Armand — [@ArmandS11](https://huggingface.co/ArmandS11/)
|