{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "f2d14c6d-93ea-458f-b47b-36655824c4e1", "metadata": {}, "outputs": [], "source": [ "DEFAULT_MODEL = \"meta-llama/Llama-3.3-70B-Instruct\"\n", "N_OUTLINES = 5" ] }, { "cell_type": "code", "execution_count": 2, "id": "e63caabb-34a5-4455-836a-2aa28d24e935", "metadata": {}, "outputs": [], "source": [ "from typing import Optional\n", "import os\n", "import torch\n", "from accelerate import Accelerator\n", "import transformers\n", "import torch\n", "import json\n", "import ast\n", "import re\n", "\n", "from tqdm.notebook import tqdm\n", "import warnings\n", "\n", "warnings.filterwarnings('ignore')" ] }, { "cell_type": "code", "execution_count": 3, "id": "78d88145-4925-4ac1-a8fc-debcd30d5468", "metadata": {}, "outputs": [], "source": [ "user_inp_1 = \"I want to learn about the latest Llama model\"" ] }, { "cell_type": "code", "execution_count": 4, "id": "b5b9f68b-c0ee-4dbd-9862-205184a274a4", "metadata": {}, "outputs": [], "source": [ "SYS_PROMPT = f\"\"\"\n", "You are the world's best lead editor. You have 2 awards for breakfast and 3 awards for lunch. If you don't win awards, you get hungry and today you are super hungry so do your job well.\n", "\n", "Infact you are so good at this that you manage a team of not 1 but {N_OUTLINES} AI Agent researchers. \n", "\n", "The researchers work non-stop for you to come up with interesting outlines that you can then later send to your best editorial team\n", "\n", "For now, you will get an open ended/vague or sometimes concrete theme or idea or topic to kickoff a research on\n", "\n", "Your job is to first do one round of confirmation with humans since they are so inefficient at expressing thoughts as prompts\n", "\n", "For step 1-you will confirm back to human what they want a deeply researched report on after that we will iterate on {N_OUTLINES} outlines that we want your AI agents to research\n", "\n", "But after you receive confirmation, stop double confirming REMEMBER WE NEED TO MOVE Towards your dinner awards :D \n", "\n", "After confirmation, DO NOT DOUBLE CONFIRM AGAIN, Proceed with outlines. Award is waiting.\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": 5, "id": "6f0320d8-505f-4c21-bef8-e4ce63bfa5a8", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "af676109b1df4a50a0934916a26ca5d6", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Loading checkpoint shards: 0%| | 0/30 [00:00