Posts

Install hf on ubuntu

# 1. Install the missing Python pip and virtual environment modules sudo apt update && sudo apt install python3-pip python3-venv -y # 2. Wipe the corrupted/incomplete Hugging Face installation folder rm -rf /home/mars/.hf-cli # 3. Run the installer again curl -LsSf https://hf.co/cli/install.sh | bash

Special setting for SearchXNG with OpenClaw

In settings.yaml, search for "-html" and add "-json" after it.

Downloading and running models on vLLM with OpenClaw

OK after installing vLLM, here are what i did: hf download cyankiwi/gemma-4-26B-A4B-it-AWQ-4bit --local-dir models/gemma-4-26B-A4B-it-AWQ-4bit --> check the model is downloaded in the dir specified --> this is the tuned setting for me: vllm serve models/gemma-4-26B-A4B-it-AWQ-4bit --served-model-name gemma-4-26B-A4B-it-AWQ-4bit --max-model-len 20480 --gpu-memory-utilization 0.9 --enforce-eager --enable-auto-tool-choice --tool-call-parser gemma4 --default-chat-template-kwargs '{"enable_thinking": true}' Why this command works: --default-chat-template-kwargs: This is the global server flag that tells vLLM to pass enable_thinking=True to the Gemma 4 tokenizer every time it prepares a prompt. --enforce-eager: Critical for your 3090; it prevents CUDA graph overhead which can save you up to 2GB of VRAM. --max-model-len 20480: Your safe upper limit. In openclaw, i need to make the following changes: Setting,Value,Purpose contextWindow,20480,T...

vLLM install

cd ~/vLLM python3 -m venv venv source venv/bin/activate pip install torch --index-url https://download.pytorch.org/whl/cu118 pip install vllm pip install huggingface_hub huggingface-cli login python -m vllm.entrypoints.openai.api_server \ --model Qwen/Qwen2.5-9B-Instruct-AWQ \ --quantization awq \ --gpu-memory-utilization 0.9 \ --max-model-len 4096 With Comfyui Step 1 — Start vLLM with limit python -m vllm.entrypoints.openai.api_server \ --model Qwen/Qwen2.5-9B-Instruct-AWQ \ --quantization awq \ --gpu-memory-utilization 0.6 \ --max-model-len 4096 This reserves ~60% VRAM (~14GB) ComfyUI will: Use remaining VRAM (~10GB) Work fine for most workflows needed, launch ComfyUI with: export PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512 start-vllm.sh #!/bin/bash cd ~/ai-stack/vllm source venv/bin/activate python -m vllm.entrypoints.openai.api_server \ --model Qwen/Qwen2.5-9B-Instruct-AWQ \ --quantization awq \ --gpu-memory-utilization 0.6 start-comfyui.s...

Change IP address

Need to change in : 1. sudo nano /etc/netplan/50-cloud-init.yaml sudo netplan apply 2. sudo systemctl edit docker.service sudo systemctl daemon-reload sudo systemctl status docker.service 3. Portainer tcp://192.168.1.15:2375 (docker api)

Set manual ip via command line

Use the command below to find details of the available adapters and the respective IP information. ip a Go to the netplan directory located at /etc/netplan. ls into the /etc/netplan directory. If you do not see any files, you can create one. The name could be anything, but by convention, it should start with a number like 01- and end with .yaml. The number sets the priority if you have more than one configuration file. sudo nano /etc/netplan/50-cloud-init.yaml sudo netplan apply

Connect bluetooth keyboard

https://askubuntu.com/questions/701978/how-can-a-bluetooth-keyboard-that-requires-a-code-entry-be-paired-in-the-termina $ bluetoothctl [NEW] Controller AA:BB:CC:DD:EE:FF device-name [default] [bluetooth]# power on Changing power on succeeded [bluetooth]# agent on Agent registered [bluetooth]# default-agent Default agent request successful scan onoth]# scan on [bluetooth]# SetDiscoveryFilter success [bluetooth]# Discovery started [bluetooth]# [CHG] Controller 08:B4:D2:CD:96:FE Discovering: yes [bluetooth]# [NEW] Device 1E:92:C2:38:6D:DD 1E-92-C2-38-6D-DD [bluetooth]# [NEW] Device 61:0C:46:EE:B3:C5 JBL Bar 5.0-495 [bluetooth]# [NEW] Device 76:54:8D:8A:24:87 76-54-8D-8A-24-87 [bluetooth]# [NEW] Device 03:2F:83:E5:0D:6C 03-2F-83-E5-0D-6C [bluetooth]# [NEW] Device F0:4D:D4:E5:3E:B1 Bedroom TV [bluetooth]# [NEW] Device 5F:5A:30:8D:4A:FB 5F-5A-30-8D-4A-FB [bluetooth]# [NEW] Device 3B:C5:20:E8:65:22 3B-C5-20-E8-65-22 [bluetooth]# [NEW] Device 75:33:D3:3A:62:D3 75-33-D3-3A-62-D3 [blu...