Run DeepHermes 3 on Linux: Step by Step Installation Guide
DeepHermes-3 is a cutting-edge language model that can be run locally on a Linux system, offering powerful reasoning capabilities directly on your machine. This guide provides a detailed installation process, covering all the necessary steps to get DeepHermes-3 running on your Linux environment.
Prerequisites
Before diving into the installation, ensure your system meets the following prerequisites:
- A 64-bit (x86_64) compatible computer: This is a standard requirement for most modern Linux distributions.
- Minimum 2GB RAM (4GB+ recommended): DeepHermes-3 benefits from more RAM, especially when running larger models.
- Minimum 20GB storage space: Ensure sufficient storage for the operating system, dependencies, and the DeepHermes-3 model itself.
- Internet connection: An active internet connection is needed to download the necessary packages and dependencies.
- Basic knowledge of Linux commands: Familiarity with the command line interface is essential for navigating the installation process.
Step by Step Installation Guide
Step 1: Installing Arch Linux (if necessary)
If you do not have Arch Linux already, follow these steps.
- Back Up Your Data: Before proceeding, back up ALL data from the target installation drive, as the installation process will erase existing data.
- Download the latest ISO from https://archlinux.org/download/.
- Verify the ISO's integrity using the provided SHA256 checksum:
- Create Installation Media:Using Rufus (Windows):
- Download Rufus from https://rufus.ie.
- Insert your USB drive.
- Select the Arch Linux ISO.
- Choose these specific settings:
- Partition scheme: GPT
- Target system: UEFI
- File system: FAT32
- Click Start and wait for completion.
- Boot Preparation:
- Disable Secure Boot in BIOS/UEFI settings.
- Set boot priority to USB.
- Save changes and restart.
- When the Arch boot menu appears, select "Arch Linux install medium".
- EFI System Partition (ESP):
- Size: 550MB
- Type code: ef00
- Command sequence: n, 1, default, +550M, ef00
- Root partition:
- Size: Remaining space
- Type code: 8300
- Command sequence: n, 2, default, default, 8300
- Exit and Reboot:Exit the chroot environment:
exit
Unmount all partitions:
umount -R /mnt
Reboot:
reboot
- Enable Essential Services:
systemctl enable NetworkManager
systemctl enable fstrim.timer
- Configure Boot Loader:Install GRUB:
grub-install --target=x86_64-efi --efi-directory=/boot/efi \
--bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
- User Configuration:Set root password:
passwd
- Create user account:
useradd -m -G wheel,audio,video,optical,storage username
passwd username
- Configure sudo:
EDITOR=vim visudo
# Uncomment %wheel ALL=(ALL:ALL) ALL
- Configure Base System:Change root into the new system:
arch-chroot /mnt
- Set timezone:
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc
- Configure locale:
vim /etc/locale.gen
# Uncomment en_US.UTF-8 UTF-8
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
- Set hostname:
echo "myhostname" > /etc/hostname
- Configure hosts file:
vim /etc/hosts
Add:
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
- Generate fstab:
genfstab -U /mnt >> /mnt/etc/fstab
- Install Essential Packages:Install base system:
pacstrap /mnt base base-devel linux linux-firmware intel-ucode \
vim networkmanager grub efibootmgr
Note: Use amd-ucode
instead of intel-ucode
for AMD processors[2].
- Mount Partitions:Mount root first:
mount /dev/nvme0n1p2 /mnt
Create and mount EFI directory:
mkdir -p /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi
- Format Partitions:Format the EFI partition:
mkfs.fat -F 32 /dev/nvme0n1p1
Format the root partition:
mkfs.ext4 /dev/nvme0n1p2
- Partition the Disk:First, identify your target disk:
lsblk
For a modern UEFI system with a single disk, create these partitions using gdisk
:
gdisk /dev/nvme0n1 # or /dev/sda for SATA drives
Create the following partition layout:Write changes: w
- Update System Clock:
timedatectl set-ntp true
timedatectl status
- Connect to the Internet:For wired connections:
ip link
dhcpcd
For wireless:
iwctl
device list
station wlan0 scan
station wlan0 get-networks
station wlan0 connect SSID
# Enter password when prompted
exit
Verify connection:
ping -c 3 archlinux.org
- Verify Boot Mode:
ls /sys/firmware/efi/efivars
If this directory exists, you're in UEFI mode (correct). If not, you need to boot in UEFI mode.
- Download and Verify the ISO:
sha256sum path/to/archlinux.iso
Step 2: Install Ollama
Ollama is a tool that simplifies the process of running language models like DeepSeek-R1. It handles the complexities of model management, making it easy to download, run, and manage different models.
To install Ollama, follow these steps:
- Download and install Ollama: Follow the instructions on the official Ollama website to download and install the appropriate package for your Linux distribution.
- Verify the installation: Open a new terminal and run the command
ollama --version
. If Ollama is installed correctly, it will display the version number.
Step 3: Download and Run DeepHermes-3
With Ollama installed, downloading and running DeepHermes-3 is straightforward.
- Run DeepHermes-3: Once the download is complete, Ollama will automatically run DeepHermes-3, and you can start interacting with the model by entering prompts in the terminal.
- Download DeepHermes-3: Use the following command to download the DeepHermes-3 model:
ollama run deepseek-r1:70b
Note: Replace 70b
with the appropriate model size, such as 7b
or 8b
, depending on your system's capabilities and desired performance.
Step 4: Interacting with DeepHermes-3
Once DeepHermes-3 is running, you can start experimenting with its capabilities by providing prompts and observing the model's responses.
- Enter your first prompt: Type your prompt in the terminal and press Enter. DeepHermes-3 will process your input and generate a response.
- Experiment with different prompts: Try different types of prompts to explore the model's versatility and reasoning capabilities.
Step 5: Managing DeepHermes-3 Models
Ollama provides commands for listing and removing models, allowing you to manage your disk space and switch between different models as needed.
Removing installed models: To remove an installed model and free up disk space, use the following command:
ollama rm deepseek-r1:70b
Replace 70b
with the appropriate model size you wish to remove.
Listing installed models: To view all models downloaded, run the following command:
ollama list
This command will display a list of all the models currently installed on your system, along with their sizes and other relevant information.
Step 6: Post-Installation Tasks
After rebooting and logging in:
Install basic desktop environment (optional):
sudo pacman -S xorg-server xorg-xinit
# Then install your preferred desktop environment
Update system:
sudo pacman -Syu
Connect to network:
nmtui
Troubleshooting
- No bootloader entry:
- Verify EFI partition is mounted correctly
- Ensure GRUB installation path is correct
- Check if Secure Boot is disabled
- No network after reboot:
- Start NetworkManager:
sudo systemctl start NetworkManager
- Connect using:
nmtui
- Start NetworkManager:
- Black screen after install:
- Boot with kernel parameter:
nomodeset
- Install appropriate graphics drivers after booting
- Boot with kernel parameter:
Maintaining Your Installation
Check system logs for issues:
journalctl -p 3 -xb
Clean package cache periodically:
sudo pacman -Sc
Regular system updates:
sudo pacman -Syu
Conclusion
By following this guide, you should now have DeepHermes-3 successfully installed and running on your Linux system. You can now explore its capabilities and integrate it into your projects.
References
- Run DeepSeek Janus-Pro 7B on Mac: A Comprehensive Guide Using ComfyUI
- Run DeepSeek Janus-Pro 7B on Mac: Step-by-Step Guide
- Run DeepSeek Janus-Pro 7B on Windows: A Complete Installation Guide
- Run DeepHermes 3 on Windows: Step by Step Installation Guide
- Run DeepHermes 3 on macOS: Step by Step Installation Guide