Bash RC For swap command For Linuix Ollama Using Massive Models On RPI 5 Easy!
Page 1 of 1
Bash RC For swap command For Linuix Ollama Using Massive Models On RPI 5 Easy!
Using a big swap file command is key to loading massive models!
now save exit and in new terminal type swap
put in 20 or leave for default of 20 GB
now you can put in password if requested! and load your massive model with ease!
As soon as you run the swap command you can run massive models on a rpi with only 8 gb actual ram
- Code:
sudo gedit ~/.bashrc
- Code:
function swap() {
# Set the default size to 20 GB
local default_swap_size=20
# Check if an argument is supplied
if [ -z "$1" ]; then
read -p "Enter Swap Size (GB) [default: $default_swap_size]: " sizeofswap
# If no input is provided, use the default size
sizeofswap=${sizeofswap:-$default_swap_size}
echo "Setting New Swap Size To $sizeofswap GB"
else
echo "Setting New Swap Size To $1 GB"
sizeofswap=$1
fi
sudo swapoff /swapfile
sudo rm /swapfile
sudo fallocate -l "${sizeofswap}G" /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo "New Swap Size Of $sizeofswap GB"
free -h
}
now save exit and in new terminal type swap
put in 20 or leave for default of 20 GB
now you can put in password if requested! and load your massive model with ease!
As soon as you run the swap command you can run massive models on a rpi with only 8 gb actual ram
- Code:
ollama run hermes3
Similar topics
» Face Swap Android App
» linux encrypt swap files
» Using Figlet To Create banner Art From Command Line With Bash
» In BashUp Arrow To Get Command History On Linux In Bash
» The Fuck Linux Command Corrector Install Command
» linux encrypt swap files
» Using Figlet To Create banner Art From Command Line With Bash
» In BashUp Arrow To Get Command History On Linux In Bash
» The Fuck Linux Command Corrector Install Command
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum