{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "0d641747",
   "metadata": {},
   "source": [
    "## Llama CPP\n",
    "\n",
    "Lecture 19 | CMU ANLP Fall 2025 | Instructor: Sean Welleck\n",
    "\n",
    "This notebook shows running inference with a quantized Qwen3-8B via the llama cpp server.\n",
    "\n",
    "After running the cells below, navigate to http://localhost:8080/ to interact with the model."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "70d8ee53",
   "metadata": {},
   "outputs": [],
   "source": [
    "!brew install llama.cpp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "df3de2db",
   "metadata": {},
   "outputs": [],
   "source": [
    "!llama-server -hf Qwen/Qwen3-8B-GGUF:Q4_K_M --port 8080"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "anlp",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
