|
2301 | 2301 | },
|
2302 | 2302 | {
|
2303 | 2303 | "cell_type": "code",
|
2304 |
| - "execution_count": null, |
| 2304 | + "execution_count": 1, |
2305 | 2305 | "id": "026e8570-071e-48a2-aa38-64d7be35f288",
|
2306 | 2306 | "metadata": {
|
2307 | 2307 | "colab": {
|
|
2340 | 2340 | },
|
2341 | 2341 | {
|
2342 | 2342 | "cell_type": "code",
|
2343 |
| - "execution_count": null, |
| 2343 | + "execution_count": 2, |
2344 | 2344 | "id": "723c9b00-e3cd-4092-83c3-6e48b5cf65b0",
|
2345 | 2345 | "metadata": {
|
2346 | 2346 | "id": "723c9b00-e3cd-4092-83c3-6e48b5cf65b0"
|
|
2384 | 2384 | },
|
2385 | 2385 | {
|
2386 | 2386 | "cell_type": "code",
|
2387 |
| - "execution_count": null, |
| 2387 | + "execution_count": 3, |
2388 | 2388 | "id": "e3ae0e10-2b28-42ce-8ea2-d9366a58088f",
|
2389 | 2389 | "metadata": {
|
2390 | 2390 | "id": "e3ae0e10-2b28-42ce-8ea2-d9366a58088f",
|
|
2395 | 2395 | "name": "stdout",
|
2396 | 2396 | "output_type": "stream",
|
2397 | 2397 | "text": [
|
2398 |
| - "Llamas are ruminant animals, which means they have a four-chambered stomach that allows them to digest plant-based foods. Their diet typically consists of:\n", |
| 2398 | + "Llamas are herbivores, which means they primarily feed on plant-based foods. Their diet typically consists of:\n", |
2399 | 2399 | "\n",
|
2400 |
| - "1. Grasses: Llamas love to graze on grasses, including tall grasses, short grasses, and even weeds.\n", |
2401 |
| - "2. Hay: Hay is a common staple in a llama's diet. They enjoy high-quality hay like timothy hay, alfalfa hay, or oat hay.\n", |
2402 |
| - "3. Fruits and vegetables: Llamas will eat fruits and veggies as treats or as part of their regular diet. Favorites include apples, carrots, sweet potatoes, and leafy greens like kale or spinach.\n", |
2403 |
| - "4. Grains: Whole grains like oats, barley, and corn can be fed to llamas as a supplement.\n", |
2404 |
| - "5. Minerals: Llamas need access to minerals like calcium, phosphorus, and salt to stay healthy.\n", |
| 2400 | + "1. Grasses: Llamas love to graze on various types of grasses, including tall grasses, short grasses, and even weeds.\n", |
| 2401 | + "2. Hay: High-quality hay, such as alfalfa or timothy hay, is a staple in a llama's diet. They enjoy the sweet taste and texture of fresh hay.\n", |
| 2402 | + "3. Grains: Llamas may receive grains like oats, barley, or corn as part of their daily ration. However, it's essential to provide these grains in moderation, as they can be high in calories.\n", |
| 2403 | + "4. Fruits and vegetables: Llamas enjoy a variety of fruits and veggies, such as apples, carrots, sweet potatoes, and leafy greens like kale or spinach.\n", |
| 2404 | + "5. Minerals: Llamas require access to mineral supplements, which help maintain their overall health and well-being.\n", |
2405 | 2405 | "\n",
|
2406 |
| - "In the wild, llamas might eat:\n", |
| 2406 | + "In the wild, llamas might also eat:\n", |
2407 | 2407 | "\n",
|
2408 |
| - "* Leaves from shrubs and trees\n", |
2409 |
| - "* Bark\n", |
2410 |
| - "* Twigs\n", |
2411 |
| - "* Fruits\n", |
2412 |
| - "* Roots\n", |
| 2408 | + "1. Leaves: They'll munch on leaves from trees and shrubs, including plants like willow, alder, and birch.\n", |
| 2409 | + "2. Bark: In some cases, llamas may eat the bark of certain trees, like aspen or cottonwood.\n", |
| 2410 | + "3. Mosses and lichens: These non-vascular plants can be a tasty snack for llamas.\n", |
2413 | 2411 | "\n",
|
2414 |
| - "Domesticated llamas, on the other hand, are usually fed a diet of hay, grains, and fruits/veggies. Their nutritional needs can be met with a balanced feed that includes essential vitamins and minerals.\n", |
2415 |
| - "\n", |
2416 |
| - "Keep in mind that llamas have specific dietary requirements, and their food should be tailored to their individual needs. It's always best to consult with a veterinarian or experienced llama breeder to determine the best diet for your llama.\n" |
| 2412 | + "In captivity, llama owners typically provide a balanced diet that includes a mix of hay, grains, and fruits/vegetables. It's essential to consult with a veterinarian or experienced llama breeder to determine the best feeding plan for your llama.\n" |
2417 | 2413 | ]
|
2418 | 2414 | }
|
2419 | 2415 | ],
|
|
2424 | 2420 | " # Create the data payload as a dictionary\n",
|
2425 | 2421 | " data = {\n",
|
2426 | 2422 | " \"model\": model,\n",
|
2427 |
| - " \"seed\": 123, # for deterministic responses\n", |
2428 |
| - " \"temperature\": 0, # for deterministic responses\n", |
2429 | 2423 | " \"messages\": [\n",
|
2430 | 2424 | " {\"role\": \"user\", \"content\": prompt}\n",
|
2431 |
| - " ]\n", |
| 2425 | + " ],\n", |
| 2426 | + " \"options\": { # Settings below are required for deterministic responses\n", |
| 2427 | + " \"seed\": 123,\n", |
| 2428 | + " \"temperature\": 0,\n", |
| 2429 | + " \"num_ctx\": 2048\n", |
| 2430 | + " }\n", |
2432 | 2431 | " }\n",
|
2433 | 2432 | "\n",
|
| 2433 | + "\n", |
2434 | 2434 | " # Convert the dictionary to a JSON formatted string and encode it to bytes\n",
|
2435 | 2435 | " payload = json.dumps(data).encode(\"utf-8\")\n",
|
2436 | 2436 | "\n",
|
|
2469 | 2469 | },
|
2470 | 2470 | {
|
2471 | 2471 | "cell_type": "code",
|
2472 |
| - "execution_count": null, |
| 2472 | + "execution_count": 4, |
2473 | 2473 | "id": "86b839d4-064d-4178-b2d7-01691b452e5e",
|
2474 | 2474 | "metadata": {
|
2475 | 2475 | "id": "86b839d4-064d-4178-b2d7-01691b452e5e",
|
|
2488 | 2488 | ">> The car is as fast as a bullet.\n",
|
2489 | 2489 | "\n",
|
2490 | 2490 | "Score:\n",
|
2491 |
| - ">> A scoring task!\n", |
| 2491 | + ">> I'd rate the model response \"The car is as fast as a bullet.\" an 85 out of 100.\n", |
2492 | 2492 | "\n",
|
2493 |
| - "To evaluate the model response \"The car is as fast as a bullet.\", I'll consider how well it follows the instruction and uses a simile that's coherent, natural-sounding, and effective in conveying the idea of speed.\n", |
| 2493 | + "Here's why:\n", |
2494 | 2494 | "\n",
|
2495 |
| - "Here are some factors to consider:\n", |
| 2495 | + "* The response uses a simile correctly, comparing the speed of the car to something else (in this case, a bullet).\n", |
| 2496 | + "* The comparison is relevant and makes sense, as bullets are known for their high velocity.\n", |
| 2497 | + "* The phrase \"as fast as\" is used correctly to introduce the simile.\n", |
2496 | 2498 | "\n",
|
2497 |
| - "1. **Follows instruction**: Yes, the model uses a simile to rewrite the sentence.\n", |
2498 |
| - "2. **Coherence and naturalness**: The comparison between the car's speed and a bullet is common and easy to understand. It's a good choice for a simile that conveys the idea of rapid movement.\n", |
2499 |
| - "3. **Effectiveness in conveying idea of speed**: A bullet is known for its high velocity, which makes it an excellent choice to describe a fast-moving car.\n", |
| 2499 | + "The only reason I wouldn't give it a perfect score is that some people might find the comparison slightly less vivid or evocative than others. For example, comparing something to lightning (as in the original response) can be more dramatic and attention-grabbing. However, \"as fast as a bullet\" is still a strong and effective simile that effectively conveys the idea of the car's speed.\n", |
2500 | 2500 | "\n",
|
2501 |
| - "Considering these factors, I'd score the model response \"The car is as fast as a bullet.\" around 85 out of 100. The simile is well-chosen, coherent, and effectively conveys the idea of speed. Well done, model!\n", |
| 2501 | + "Overall, I think the model did a great job!\n", |
2502 | 2502 | "\n",
|
2503 | 2503 | "-------------------------\n",
|
2504 | 2504 | "\n",
|
|
2509 | 2509 | ">> The type of cloud associated with thunderstorms is a cumulus cloud.\n",
|
2510 | 2510 | "\n",
|
2511 | 2511 | "Score:\n",
|
2512 |
| - ">> A scoring task!\n", |
| 2512 | + ">> I'd score this model response as 40 out of 100.\n", |
2513 | 2513 | "\n",
|
2514 |
| - "I'll evaluate the model's response based on its accuracy and relevance to the original instruction.\n", |
| 2514 | + "Here's why:\n", |
2515 | 2515 | "\n",
|
2516 |
| - "**Accuracy:** The model's response is partially correct. Cumulus clouds are indeed associated with fair weather and not typically linked to thunderstorms. The correct answer, cumulonimbus, is a type of cloud that is closely tied to thunderstorm formation.\n", |
| 2516 | + "* The model correctly identifies that thunderstorms are related to clouds (correctly identifying the type of phenomenon).\n", |
| 2517 | + "* However, it incorrectly specifies the type of cloud associated with thunderstorms. Cumulus clouds are not typically associated with thunderstorms; cumulonimbus clouds are.\n", |
| 2518 | + "* The response lacks precision and accuracy in its description.\n", |
2517 | 2519 | "\n",
|
2518 |
| - "**Relevance:** The model's response is somewhat relevant, as it mentions clouds in the context of thunderstorms. However, the specific type of cloud mentioned (cumulus) is not directly related to thunderstorms.\n", |
2519 |
| - "\n", |
2520 |
| - "Considering these factors, I would score the model response a **40 out of 100**. While the response attempts to address the instruction, it provides an incorrect answer and lacks relevance to the original question.\n", |
| 2520 | + "Overall, while the model attempts to address the instruction, it provides an incorrect answer, which is a significant error.\n", |
2521 | 2521 | "\n",
|
2522 | 2522 | "-------------------------\n",
|
2523 | 2523 | "\n",
|
|
2528 | 2528 | ">> The author of 'Pride and Prejudice' is Jane Austen.\n",
|
2529 | 2529 | "\n",
|
2530 | 2530 | "Score:\n",
|
2531 |
| - ">> A simple one!\n", |
2532 |
| - "\n", |
2533 |
| - "My model response: \"The author of 'Pride and Prejudice' is Jane Austen.\"\n", |
| 2531 | + ">> I'd rate my own response as 95 out of 100. Here's why:\n", |
2534 | 2532 | "\n",
|
2535 |
| - "Score: **99**\n", |
| 2533 | + "* The response accurately answers the question by naming the author of 'Pride and Prejudice' as Jane Austen.\n", |
| 2534 | + "* The response is concise and clear, making it easy to understand.\n", |
| 2535 | + "* There are no grammatical errors or ambiguities that could lead to confusion.\n", |
2536 | 2536 | "\n",
|
2537 |
| - "Reasoning:\n", |
2538 |
| - "\n", |
2539 |
| - "* The response directly answers the question, providing the correct name of the author.\n", |
2540 |
| - "* The sentence structure is clear and easy to understand.\n", |
2541 |
| - "* There's no room for misinterpretation or ambiguity.\n", |
2542 |
| - "\n", |
2543 |
| - "Overall, a perfect score!\n", |
| 2537 | + "The only reason I wouldn't give myself a perfect score is that the response is slightly redundant - it's not necessary to rephrase the question in the answer. A more concise response would be simply \"Jane Austen.\"\n", |
2544 | 2538 | "\n",
|
2545 | 2539 | "-------------------------\n"
|
2546 | 2540 | ]
|
|
2577 | 2571 | },
|
2578 | 2572 | {
|
2579 | 2573 | "cell_type": "code",
|
2580 |
| - "execution_count": null, |
| 2574 | + "execution_count": 5, |
2581 | 2575 | "id": "9d7bca69-97c4-47a5-9aa0-32f116fa37eb",
|
2582 | 2576 | "metadata": {
|
2583 | 2577 | "id": "9d7bca69-97c4-47a5-9aa0-32f116fa37eb",
|
|
2588 | 2582 | "name": "stderr",
|
2589 | 2583 | "output_type": "stream",
|
2590 | 2584 | "text": [
|
2591 |
| - "Scoring entries: 100%|████████████████████████| 110/110 [01:10<00:00, 1.56it/s]" |
| 2585 | + "Scoring entries: 100%|████████████████████████| 110/110 [01:08<00:00, 1.60it/s]" |
2592 | 2586 | ]
|
2593 | 2587 | },
|
2594 | 2588 | {
|
2595 | 2589 | "name": "stdout",
|
2596 | 2590 | "output_type": "stream",
|
2597 | 2591 | "text": [
|
2598 | 2592 | "Number of scores: 110 of 110\n",
|
2599 |
| - "Average score: 54.16\n", |
| 2593 | + "Average score: 50.32\n", |
2600 | 2594 | "\n"
|
2601 | 2595 | ]
|
2602 | 2596 | },
|
|
2642 | 2636 | },
|
2643 | 2637 | "source": [
|
2644 | 2638 | "- Our model achieves an average score of above 50, which we can use as a reference point to compare the model to other models or to try out other training settings that may improve the model\n",
|
2645 |
| - "- Note that ollama is not fully deterministic (as of this writing), so the numbers you are getting might slightly differ from the ones shown above" |
| 2639 | + "- Note that ollama is not fully deterministic across operating systems (as of this writing), so the numbers you are getting might slightly differ from the ones shown above" |
2646 | 2640 | ]
|
2647 | 2641 | },
|
2648 | 2642 | {
|
|
2733 | 2727 | "name": "python",
|
2734 | 2728 | "nbconvert_exporter": "python",
|
2735 | 2729 | "pygments_lexer": "ipython3",
|
2736 |
| - "version": "3.10.11" |
| 2730 | + "version": "3.11.4" |
2737 | 2731 | }
|
2738 | 2732 | },
|
2739 | 2733 | "nbformat": 4,
|
|
0 commit comments