<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: kshitij Bhatnagar</title>
    <description>The latest articles on Forem by kshitij Bhatnagar (@kbhatnagar).</description>
    <link>https://forem.com/kbhatnagar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1962034%2F659bb067-53b1-4f32-b285-3f8ca483204b.jpg</url>
      <title>Forem: kshitij Bhatnagar</title>
      <link>https://forem.com/kbhatnagar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kbhatnagar"/>
    <language>en</language>
    <item>
      <title>How to Run DeepSeek R1 Locally (Using Ollama + ChatboxAI)</title>
      <dc:creator>kshitij Bhatnagar</dc:creator>
      <pubDate>Thu, 20 Feb 2025 02:09:58 +0000</pubDate>
      <link>https://forem.com/kbhatnagar/how-to-run-deepseek-r1-locally-using-ollama-chatboxai-4po9</link>
      <guid>https://forem.com/kbhatnagar/how-to-run-deepseek-r1-locally-using-ollama-chatboxai-4po9</guid>
      <description>&lt;p&gt;If you want to run &lt;strong&gt;DeepSeek R1&lt;/strong&gt; locally on your system, there's no need to worry. This guide is written in a simple and easy-to-follow manner, explaining step-by-step how to use &lt;strong&gt;Ollama&lt;/strong&gt; and &lt;strong&gt;ChatboxAI&lt;/strong&gt; to get it running.  &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;🖥️ System Requirements (Based on GPU/RAM)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Each model has different hardware requirements, so first, check which model your system can support:  &lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;GPU Required&lt;/th&gt;
&lt;th&gt;VRAM (GPU Memory)&lt;/th&gt;
&lt;th&gt;RAM (System Memory)&lt;/th&gt;
&lt;th&gt;Storage (ROM)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DeepSeek R1 1.5B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No GPU / Integrated GPU&lt;/td&gt;
&lt;td&gt;4GB+&lt;/td&gt;
&lt;td&gt;8GB+&lt;/td&gt;
&lt;td&gt;10GB+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DeepSeek R1 7B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;GTX 1650 / RTX 3050&lt;/td&gt;
&lt;td&gt;6GB+&lt;/td&gt;
&lt;td&gt;16GB+&lt;/td&gt;
&lt;td&gt;30GB+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DeepSeek R1 14B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;RTX 3060 / RTX 4060&lt;/td&gt;
&lt;td&gt;12GB+&lt;/td&gt;
&lt;td&gt;32GB+&lt;/td&gt;
&lt;td&gt;60GB+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DeepSeek R1 33B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;RTX 4090 / A100&lt;/td&gt;
&lt;td&gt;24GB+&lt;/td&gt;
&lt;td&gt;64GB+&lt;/td&gt;
&lt;td&gt;100GB+&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;👉 If your system has &lt;strong&gt;GTX 1650 or lower&lt;/strong&gt;, you can only run &lt;strong&gt;DeepSeek R1 1.5B or at most 7B&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;👉 &lt;strong&gt;For 7B, at least 16GB RAM&lt;/strong&gt; is required.
&lt;/li&gt;
&lt;li&gt;👉 If you have a &lt;strong&gt;GPU lower than GTX 1650 (or an integrated GPU)&lt;/strong&gt;, only use &lt;strong&gt;1.5B&lt;/strong&gt; to avoid crashes.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;⚙️ Step-by-Step Installation Guide&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1️⃣ Install Ollama (Base for Llama Models)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Ollama is a lightweight tool that helps run &lt;strong&gt;LLMs (Large Language Models) locally&lt;/strong&gt;. Install it first:  &lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;&lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama Installation Link&lt;/a&gt;&lt;/strong&gt;  &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;👉 For Windows Users:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Download the installer and install it (just click &lt;em&gt;Next-Next&lt;/em&gt;).
&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;CMD&lt;/strong&gt; and check by running:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  ollama run llama2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If this command runs successfully, the installation is complete.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👉 For Mac Users:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Open Terminal and run:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -fsSL https://ollama.com/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;2️⃣ Download the DeepSeek R1 Model&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Use the following command to pull the model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ollama pull deepseek-ai/deepseek-coder:7b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;- 👉 If you want to run 1.5B instead of 7B, use:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ollama pull deepseek-ai/deepseek-coder:1.5b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠ This download may take some time depending on your internet speed. Once downloaded, you can run it using Ollama.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3️⃣ Install ChatboxAI (Optional GUI for Better Experience)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you want a Graphical User Interface (GUI), ChatboxAI is the best tool to interact with local AI models.&lt;/p&gt;

&lt;p&gt;🔗 ChatboxAI Installation Link&lt;/p&gt;

&lt;p&gt;Installation Steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Ensure Python 3.10+ is installed.&lt;/li&gt;
&lt;li&gt;
Open Command Prompt (CMD) and run:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/oobabooga/text-generation-webui.git
cd text-generation-webui
pip install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
Start the server:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python server.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
Open your browser and go to localhost:7860, then select your model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🚀 Running DeepSeek R1 (Final Step)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once everything is installed, it’s time to run the model:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👉 Open CMD and run:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ollama run deepseek-ai/deepseek-coder:7b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;👉 If 7B is not running, try with 1.5B:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ollama run deepseek-ai/deepseek-coder:1.5b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;👉 If you are using ChatboxAI, just open the browser and interact with the model through the GUI.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now you can use DeepSeek R1 for coding, AI chat, and optimizing your workflow! 😎🔥&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🛠️ Common Problems &amp;amp; Solutions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;❌ 1️⃣ Model crashes due to low VRAM?&lt;br&gt;
✔ Try 1.5B instead of 7B.&lt;br&gt;
✔ Increase Windows Pagefile (Virtual Memory settings).&lt;/p&gt;

&lt;p&gt;❌ 2️⃣ Model response is too slow?&lt;br&gt;
✔ Use SSD instead of HDD.&lt;br&gt;
✔ Close background applications.&lt;br&gt;
✔ Optimize RAM usage.&lt;/p&gt;

&lt;p&gt;❌ 3️⃣ ‘Command not found’ error in CMD?&lt;br&gt;
✔ Check if Ollama is installed correctly.&lt;br&gt;
✔ Ensure Python and dependencies are installed.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;🤩 Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you followed this guide correctly, you can now run DeepSeek R1 locally without relying on third-party APIs. This is a privacy-friendly and cost-effective solution, perfect for developers and freelancers.&lt;/p&gt;

&lt;p&gt;If you face any issues, drop a comment, and you’ll get help! 🚀🔥&lt;/p&gt;

</description>
      <category>deepseek</category>
      <category>ai</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Manage Multiple GitHub Accounts with SSH Keys</title>
      <dc:creator>kshitij Bhatnagar</dc:creator>
      <pubDate>Wed, 21 Aug 2024 23:51:03 +0000</pubDate>
      <link>https://forem.com/kbhatnagar/managing-multiple-github-accounts-with-ssh-keys-4a9b</link>
      <guid>https://forem.com/kbhatnagar/managing-multiple-github-accounts-with-ssh-keys-4a9b</guid>
      <description>&lt;p&gt;In today's dynamic development environment, it's common to juggle multiple GitHub accounts—whether for work, personal projects, or open-source contributions. However, seamlessly switching between your office and personal GitHub profiles can be challenging if not properly managed. This guide will walk you through the best practices and essential steps to effortlessly handle multiple GitHub accounts, ensuring that your workflows remain smooth and your code stays organized, no matter which account you’re using. &lt;/p&gt;

&lt;h2&gt;
  
  
  Step-by-Step Guide
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Generate SSH Keys
&lt;/h3&gt;

&lt;p&gt;Generate separate SSH keys for your office and personal GitHub accounts.&lt;/p&gt;

&lt;h4&gt;
  
  
  Office Account:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t rsa -b 4096 -C "your_office_email@example.com" -f ~/.ssh/id_rsa_office
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Personal Account:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t rsa -b 4096 -C "your_personal_email@example.com" -f ~/.ssh/id_rsa_personal_account
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Add SSH Keys to GitHub
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Office Account:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt; Copy the public key to your clipboard:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    cat ~/.ssh/id_rsa_office.pub

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt; Go to GitHub (office account) -&amp;gt; Settings -&amp;gt; SSH and GPG keys -&amp;gt; New SSH key.&lt;/li&gt;
&lt;li&gt; Paste the public key and save.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Personal Account:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt; Copy the public key to your clipboard:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    cat ~/.ssh/id_rsa_personal_account.pub

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt; Go to GitHub (personal account) -&amp;gt; Settings -&amp;gt; SSH and GPG keys -&amp;gt; New SSH key.&lt;/li&gt;
&lt;li&gt; Paste the public key and save.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  3. Configure SSH Agent
&lt;/h3&gt;

&lt;p&gt;Start the SSH agent and add your keys.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa_office
ssh-add ~/.ssh/id_rsa_personal_account
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Configure &lt;code&gt;~/.ssh/config&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Edit your &lt;code&gt;~/.ssh/config&lt;/code&gt; file to define aliases for your office and personal GitHub accounts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#### Configuration for office account
Host github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_office
    IdentitiesOnly yes

#### Configuration for personal account
Host github.com-personal-account
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_personal_account
    IdentitiesOnly yes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Clone Repositories
&lt;/h3&gt;

&lt;p&gt;Clone repositories using the appropriate alias to ensure the correct SSH key is used.&lt;/p&gt;

&lt;h4&gt;
  
  
  Office Repository:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone git@github.com:organization/repository.git

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Personal Repository:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone git@github.com-personal-account:username/repository.git

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. Verify Remote URLs
&lt;/h3&gt;

&lt;p&gt;Check the remote URLs to ensure they are set correctly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote -v

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This should show URLs that match the aliases defined in your &lt;code&gt;~/.ssh/config&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Push and Pull Changes
&lt;/h3&gt;

&lt;p&gt;When pushing or pulling changes, Git will automatically use the correct SSH key based on the repository URL.&lt;/p&gt;

&lt;h4&gt;
  
  
  Push Changes:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push origin main

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Pull Changes:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull origin main

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Summary of the steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; Generate SSH Keys: Create separate SSH keys for your office and personal GitHub accounts.&lt;/li&gt;
&lt;li&gt; Add SSH Keys to GitHub: Add the public keys to the respective GitHub accounts.&lt;/li&gt;
&lt;li&gt; Configure SSH Agent: Start the SSH agent and add the generated keys.&lt;/li&gt;
&lt;li&gt; Edit &lt;code&gt;~/.ssh/config&lt;/code&gt;: Define aliases for your office and personal accounts, specifying the correct &lt;code&gt;IdentityFile&lt;/code&gt; for each.&lt;/li&gt;
&lt;li&gt; Clone Repositories: Use the appropriate alias in the repository URL to ensure the correct key is used.&lt;/li&gt;
&lt;li&gt; Verify Remote URLs: Ensure the remote URLs are set correctly to match the aliases.&lt;/li&gt;
&lt;li&gt; Push and Pull Changes: Git will use the correct SSH key based on the repository URL.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By following these steps, you can seamlessly manage multiple GitHub accounts with different SSH keys, ensuring the correct key is used for each repository.&lt;/p&gt;

&lt;p&gt;The best part is that after configuring your &lt;code&gt;~/.ssh/config&lt;/code&gt; file and carefully cloning repositories using the correct aliases, you won’t need to worry about managing the SSH agent during push and pull operations. Git will automatically select the appropriate SSH key based on the repository's URL, making your workflow seamless and hassle-free.&lt;/p&gt;

</description>
      <category>git</category>
      <category>learning</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
