












Do you know how to fine-tune DeepSeek R1 on custom data and save the fine-tuned model locally using Ollama? In this video, I will show you the entire process step by step. What You Will Learn: 1. How to fine-tune DeepSeek Mete LLaMA distillation model 2. How to load and train it using Unsloth on a GPT-4-generated dataset 3. How to save the fine-tuned model locally using Ollama 4. How to chat with the fine-tuned model What is DeepSeek R1? DeepSeek R1 is a logical reasoning model derived from DeepSeek V3. It is trained using Chain of Thought (CoT) datasets to improve its problem-solving skills. It first thinks through a problem before generating an answer. If you want a deep dive into DeepSeek R1’s architecture, check out my previous video where I explain the DeepSeek research paper in simple language. The link is available in the description. Tools Used in Fine-Tuning: 1. Unsloth: Optimises fine-tuning by performing efficient matrix multiplications. 2. Ollama: A local LLM runtime to load and interact with models easily. Fine-Tuning Process: 1. Load the Model & Tokeniser: Using Unsloth, we load the DeepSeek R1 distilled LLaMA-8B model along with its tokeniser. 2. Apply Parameter-Efficient Fine-Tuning (PEFT): We use LoRA (Low-Rank Adaptation) to fine-tune the model efficiently without modifying all parameters. 3. Prepare Training Dataset: The vicgalle/alpaca-gpt4 dataset is formatted into a conversation-friendly structure for training. 4. Train the Model Using SFTTrainer: This ensures the model learns from human-like conversations. 5. Save the Fine-Tuned Model with Ollama: We package the trained model and save it locally for offline AI interactions. 6. Chat with the Fine-Tuned Model: We use Ollama's chat function to interact with the model and test its reasoning capabilities. If you found this video helpful, like and subscribe for more AI and machine learning tutorials. Let me know in the comments if you have any questions! Source Code: https://github.com/simranjeet97/DeepSeekR1_GoogleGeminiPro_RAG_Streamlit/blob/main/deepseekv3-finetuning-ipynb%20(1).ipynb Join this channel to get access to perks: https://www.youtube.com/channel/UC4RZP6hNT5gMlWCm0NDzUWg/join Don’t forget to: Like this video, subscribe to the channel and Comment your thoughts or questions To get the Source Code, Follow me on GitHub: https://github.com/simranjeet97/ Book your call with me at topmate.io and learn how to harness the latest technologies power and speed up your learning process. Book your call at https://bit.ly/43TLDCD Follow me on Medium for the latest blogs and projects: https://bit.ly/3JGXqwc Playlists that make you skilled up 1. GenAI Full Course with LLM Fine Tuning and Evaluation: https://bit.ly/4bJwZla 2. Learn RAG from scratch with GenAI projects: https://bit.ly/3Zl47KD 3. Latest AI/GenAI Research Papers Explained: https://bit.ly/4huqEMT 4. RAG and LLM Use Cases in Finance Domain Projects: https://bit.ly/3AGSRQm 4. Prompt Engineering: https://bit.ly/42v376M 5. Financial Data Analysis and Financial Modelling: https://bit.ly/3OCWI5O 6. Artificial Intelligence Projects: https://bit.ly/3L8lhEi 7. Predict IPL 2023 Winner (End to End Data Science Project): https://bit.ly/3BfC3N9 8. Explainable AI (XAI) Machine Learning: https://bit.ly/3gsuIxb 9. Face Recognition: https://bit.ly/2YphpHm Youtube Tags: genai projects, Generative ai projects, genai project, generative ai project, Deepseek r1, nvidia, deepeek v3, deepseek r1 ollama project, deepseek r1 rag llm ollama, google gemini pro, google gemini flash, google gemini, google gemini pro 2, deepseek genai project, deepseek genai agent, deepseek genai rag llm project, LLM fine tuning, how to fine tune llm, how to fine tune deepseek r1, deepseek r1 fine tuning, parameter efficient fine tuning, LORA and QLORA, supervised fine tuning, unsloth deepseek distill, ollama deepseek r1,
![The DeepSeek OCR Paper [Explained] AI Can Now See Text Instead of Reading | Optical Compression](https://img.youtube.com/vi/-PJtCo3Nq4w/mqdefault.jpg)
The DeepSeek OCR Paper [Explained] AI Can Now See Text Instead of Reading | Optical Compression
748 views
![Build 9 End-to-End GenAI Projects before 2025 [ RAG + Agentic AI + LLMs ] Scalable System Design](https://img.youtube.com/vi/M9p5zAYDgL4/mqdefault.jpg)
Build 9 End-to-End GenAI Projects before 2025 [ RAG + Agentic AI + LLMs ] Scalable System Design
40.8K views
![GenAI Roadmap [Ultimate AI Roadmap] 2025 | From GenAI LLMs RAG Agentic AI | Future Ready Guide](https://img.youtube.com/vi/4yZ7mp6cIIg/mqdefault.jpg)
GenAI Roadmap [Ultimate AI Roadmap] 2025 | From GenAI LLMs RAG Agentic AI | Future Ready Guide
2.9K views

Design Spotify Recommendation Engine | How Music Recommenders Work? Scalable System Design
1.0K views
![Squid Game X AI [Red Light, Green Light] | Machine Learning System Design + Computer Vision](https://img.youtube.com/vi/YWWB4wesKjw/mqdefault.jpg)
Squid Game X AI [Red Light, Green Light] | Machine Learning System Design + Computer Vision
754 views

TCS to Google | From Manual Tester to Machine Learning Engineer | Punjab to FAANG | Tier 3 to GenAI
85.4K views