Tested on NVIDIA RTX 4090, but these instructions also cover AMD and Mac in case you wanna try those.
This guide assumes you are running Linux (I ran this on Ubuntu).
Before you get excited:
#!/bin/bash | |
set -euo pipefail | |
trap 'echo "at line $LINENO, exit code $? from $BASH_COMMAND" >&2; exit 1' ERR | |
# This is a Claude Code hook to stop it saying "you are right". | |
# | |
# Installation: | |
# 1. Save this script and chmod +x it to make it executable. | |
# 2. Within Claude Code, /hooks / UserPromptSubmit > Add a new hook (this file) | |
# |
# A simple script to demonstrate the sclicing and recombination of models at runtime | |
# inspired by mergekit | |
# Sadly, it doesn't work with quantisized models. | |
# | |
# public domain - silphendio | |
from transformers import AutoTokenizer, AutoModelForCausalLM, TextStreamer | |
import torch | |
model_path = 'gpt2' # huggingface name or local folder |
import json | |
import os | |
import sys | |
from collections import defaultdict | |
from tqdm import tqdm | |
import argparse | |
import torch | |
from safetensors.torch import load_file, save_file |
The following installation methods were tried out.
With some trial and error, I managed to get a stand alone Ceph Object Storage Device (OSD) service working. The instructions to replicate the installation are as follows.
version: '3' | |
volumes: | |
postgres_data: | |
driver: local | |
services: | |
postgres: | |
image: postgres | |
volumes: |
This will setup a single node Consul cluster. Development mode is not used in order to allow data persistence. We'll be interacting with the Consul server from within the container for simplicity.
Create Consul configuration and persistent data directories
$ mkdir p consul/config consul/data
/system/busybox
and enable telnetd on your device (will add additional line into /system/autorun.sh
). Use it only on E5885, not on other device!telnet 192.168.8.1 2323
/system/busybox sh