Skip to content

Instantly share code, notes, and snippets.

@MarcusTseng
MarcusTseng / start_distrobox_vulkan.sh
Created May 15, 2026 08:26
llama.cpp on Strix Halo 395 (Ryzen AI Max+ 395, 96GB unified VRAM) — start servers & update scripts | toolbox: https://github.com/kyuz0/amd-strix-halo-toolboxes
#!/bin/bash
#
# 在 llama-vulkan-radv distrobox 內啟動兩個 llama-server:
# :8081 Qwen3.5-122B (主腦, multi-modal, 256K ctx)
# :8080 Gemma-4-E4B (輔助/快速反應, 40K ctx)
#
# 行為:
# - 健康檢查取代固定 sleep
# - 落地 log 與 PID 到 ~/.local/state/llama/
# - 收到 INT/TERM 自動清理子行程
@MarcusTseng
MarcusTseng / qwen3.5-chat-template-fixed.jinja
Created April 17, 2026 16:20
qwen3.5-chat-template-fixed.jinja
{%- set image_count = namespace(value=0) %}
{%- set video_count = namespace(value=0) %}
{%- macro render_content(content, do_vision_count, is_system_content=false) %}
{%- if content is string %}
{{- content }}
{%- elif content is iterable and content is not mapping %}
{%- for item in content %}
{%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
{%- if is_system_content %}
{{- raise_exception('System message cannot contain images.') }}
@MarcusTseng
MarcusTseng / start_toolbox_vulkan_turboquant.sh
Created April 17, 2026 13:37
StrixHalo Toolbox llama-vulkan-radv
#!/bin/bash
# --- 1. Vulkan 驅動偵測 (針對 Strix Halo 修正版) ---
if [ -f "/usr/share/vulkan/icd.d/radeon_icd.x86_64.json" ]; then
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
fi
# 統一記憶體優化 (GFX1151 專用)
export GGML_VULKAN_DEVICE=0
export GGML_VULKAN_UNIFIED_MEMORY=1
@MarcusTseng
MarcusTseng / update_and_build_llama turbo quant.sh
Last active April 17, 2026 13:18
To make this seamless for your Strix Halo setup, this script handles the entire lifecycle: pulling the latest code, entering the toolbox, and running the specific CMake configuration for Vulkan + Turbo. Create a file named update_and_build_turbo.sh
#!/bin/bash
# --- 1. 設定路徑 ---
#https://github.com/TheTom/llama-cpp-turboquant
REPO_DIR="~/llama-cpp-turboquant"
# https://github.com/kyuz0/amd-strix-halo-toolboxes
TOOLBOX_NAME="llama-vulkan-radv"
echo "--- Starting Update & Build for TurboQuant ---"
@MarcusTseng
MarcusTseng / openclaw-50-day-prompts.md
Created February 22, 2026 07:38 — forked from velvet-shark/openclaw-50-day-prompts.md
OpenClaw after 50 days: all prompts for 20 real workflows (companion to YouTube video)

OpenClaw after 50 days: all prompts

Companion prompts for the video: OpenClaw after 50 days: 20 real workflows (honest review)

These are the actual prompts I use for each use case shown in the video. Copy-paste them into your agent and adjust for your setup. Most will work as-is or the agent will ask you clarifying questions.

Each prompt describes the intent clearly enough that the agent can figure out the implementation details. You don't need to hand-hold it through every step.

My setup: OpenClaw running on a VPS, Discord as primary interface (separate channels per workflow), Obsidian for notes (markdown-first), Coolify for self-hosted services.

@MarcusTseng
MarcusTseng / Ubuntu 24.04 install error correction.md
Last active January 23, 2026 14:57
Ubuntu 24.04 install error correction

LM Studio execution error

marcus@StrixHalo:~$ lmstudio  
[43309:0123/003154.438250:FATAL:sandbox/linux/suid/client/setuid_sandbox_host.cc:169]  
The SUID sandbox helper binary was found, but is not configured correctly.  
Rather than run without sandboxing I'm aborting now.  
You need to make sure that /tmp/.mount_lmstuda9V2kN/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap (core dumped)