A front-desk helper that drafts replies to the questions your customers ask most (hours, pricing, rescheduling). Swap the sample spreadsheet for your own past tickets, keep a person approving what goes out.
How to run it
Commands are copied from the source, unchanged except where a notebook cell is cut at 40 lines (marked in the code). Placeholders like <you> are the source's own. Credit goes to the authors named on each block.
Install (as written in the notebook)
%%capture
import os, importlib.util, importlib.metadata
!pip install --upgrade -qqq uv
# Keep the resident torch: `unsloth install-kernels` below takes the mamba_ssm / causal_conv1d
# wheels built for it, so there is no torch downgrade and no ~30 minute source build. Read the
# version from metadata: importing torch first would break torchvision if uv then replaced it.
try: _torch = "torch==" + importlib.metadata.version("torch").split("+")[0]
except importlib.metadata.PackageNotFoundError: _torch = "torch"
if importlib.util.find_spec("torch") is None or "COLAB_" in "".join(os.environ.keys()):
try: import numpy, PIL; _numpy = f"numpy=={numpy.__version__}"; _pil = f"pillow=={PIL.__version__}"
except: _numpy = "numpy"; _pil = "pillow"
!uv pip install -qqq \
{_torch} "triton>=3.3.0" {_numpy} {_pil} torchvision bitsandbytes "transformers==4.57.6" \
"unsloth_zoo[base] @ git+https://github.com/unslothai/unsloth-zoo" \
"unsloth[base] @ git+https://github.com/unslothai/unsloth"
!uv pip install -qqq --no-deps "torchcodec==0.5"
elif importlib.util.find_spec("unsloth") is None:
!uv pip install -qqq unsloth
!uv pip install --upgrade --no-deps transformers==4.57.6 "tokenizers>=0.22.0,<=0.23.0" trl==0.22.2 unsloth unsloth_zoo
!unsloth install-kernels
!uv pip install --no-deps --upgrade "torchao>=0.16.0"
from unsloth import FastLanguageModel
import torch
fourbit_models = [
"unsloth/granite-4.0-micro",
"unsloth/granite-4.0-h-micro",
"unsloth/granite-4.0-h-tiny",
"unsloth/granite-4.0-h-small",
# Base pretrained Granite 4 models
"unsloth/granite-4.0-micro-base",
"unsloth/granite-4.0-h-micro-base",
"unsloth/granite-4.0-h-tiny-base",
"unsloth/granite-4.0-h-small-base",
# 4bit dynamic quants for superior accuracy and low memory use
"unsloth/gemma-3-12b-it-unsloth-bnb-4bit",
"unsloth/Phi-4",
"unsloth/Llama-3.1-8B",
"unsloth/Llama-3.2-3B",
"unsloth/orpheus-3b-0.1-ft-unsloth-bnb-4bit" # [NEW] We support TTS models!
] # More models at https://huggingface.co/unsloth
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "unsloth/granite-4.0-h-micro",
max_seq_length = 2048, # Choose any for long context!
load_in_4bit = False, # 4 bit quantization to reduce memory
load_in_8bit = False, # [NEW!] A bit more accurate, uses 2x memory
full_finetuning = False, # [NEW!] We have full finetuning now!
)