|
36 | 36 | "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", |
37 | 37 | "!nohup ollama serve >/dev/null 2>&1 &\n", |
38 | 38 | "\n", |
39 | | - "# Download the granite:3.38b weights.\n", |
| 39 | + "# Download the granite:3.3:8b weights.\n", |
40 | 40 | "!ollama pull granite3.3:8b\n", |
41 | 41 | "!ollama pull llama3.2:3b\n", |
42 | 42 | "\n", |
|
193 | 193 | "\n", |
194 | 194 | "@generative\n", |
195 | 195 | "def summarize_short_story(story: str) -> str:\n", |
196 | | - " \"\"\"Summarize a short story, with one paragraph on plot and one paragraph on braod themes.\"\"\"\n", |
| 196 | + " \"\"\"Summarize a short story, with one paragraph on plot and one paragraph on broad themes.\"\"\"\n", |
197 | 197 | "\n", |
198 | 198 | "\n", |
199 | 199 | "################################################################################\n", |
|
441 | 441 | "from mellea.backends.types import ModelOption\n", |
442 | 442 | "\n", |
443 | 443 | "# You can use multiple different models at the same time!\n", |
444 | | - "m_mistral = mellea.MelleaSession(backend=OllamaModelBackend(model_id=META_LLAMA_3_2_3B))\n", |
| 444 | + "m_llama = mellea.MelleaSession(backend=OllamaModelBackend(model_id=META_LLAMA_3_2_3B))\n", |
445 | 445 | "\n", |
446 | 446 | "for seed in [x * 12 for x in range(5)]:\n", |
447 | | - " table2 = m_mistral.transform(\n", |
| 447 | + " table2 = m_llama.transform(\n", |
448 | 448 | " table1,\n", |
449 | | - " \"Add a column 'Model' that extracts which model was used or 'None' if none.\",\n", |
| 449 | + " \"Add a 'Model' column as the last column that extracts which model was used for that feature or 'None' if none.\",\n", |
450 | 450 | " model_options={ModelOption.SEED: seed},\n", |
451 | 451 | " )\n", |
452 | 452 | " if isinstance(table2, Table):\n", |
|
474 | 474 | "\n", |
475 | 475 | "**The MObject Pattern**: You should store data alongside its relevant operations (tools). This allows LLMs to interact with both the data and methods in a unified, structured manner. It also simplifies the process of exposing only the specific fields and methods you want the LLM to access.\n", |
476 | 476 | "\n", |
477 | | - "The MOBject pattern also provides a way of evolving existing classical codebases into generative programs. Mellea's @mify decorator lets you turn any class into an MObject. If needed, you can specify which fields and methods are included, and provide a template for how the object should be represented to the LLM." |
| 477 | + "The MObject pattern also provides a way of evolving existing classical codebases into generative programs. Mellea's @mify decorator lets you turn any class into an MObject. If needed, you can specify which fields and methods are included, and provide a template for how the object should be represented to the LLM." |
478 | 478 | ] |
479 | 479 | }, |
480 | 480 | { |
|
544 | 544 | { |
545 | 545 | "cell_type": "code", |
546 | 546 | "execution_count": null, |
547 | | - "metadata": { |
548 | | - "id": "Co662BJtBYBt" |
549 | | - }, |
| 547 | + "metadata": {}, |
550 | 548 | "outputs": [], |
551 | 549 | "source": [] |
552 | 550 | } |
|
0 commit comments