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"
| 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/) |