Skip to content

Commit df5d3c9

Browse files
authored
tutorial 30 - use gemma-4-26B-A4B-it on deepinfra (#496)
1 parent 21a2631 commit df5d3c9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎tutorials/30_File_Type_Preprocessing_Index_Pipeline.ipynb‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
"id": "I06qdWsZibSz"
313313
},
314314
"source": [
315-
"Now, let's build a RAG pipeline that answers queries based on the documents you just created in the section above. For this step, we will be using the [`HuggingFaceAPIChatGenerator`](https://docs.haystack.deepset.ai/docs/huggingfaceapichatgenerator) so must have a [Hugging Face API Key](https://huggingface.co/settings/tokens) for this section. We will be using the `Qwen/Qwen3-4B-Instruct-2507` model."
315+
"Now, let's build a RAG pipeline that answers queries based on the documents you just created in the section above. For this step, we will be using the [`HuggingFaceAPIChatGenerator`](https://docs.haystack.deepset.ai/docs/huggingfaceapichatgenerator) so must have a [Hugging Face API Key](https://huggingface.co/settings/tokens) for this section. We will be using the `google/gemma-4-26B-A4B-it` model with the `deepinfra` provider."
316316
]
317317
},
318318
{
@@ -409,7 +409,7 @@
409409
" \"llm\",\n",
410410
" HuggingFaceAPIChatGenerator(\n",
411411
" api_type=\"serverless_inference_api\",\n",
412-
" api_params={\"model\": \"Qwen/Qwen3-4B-Instruct-2507\", \"provider\": \"nscale\"},\n",
412+
" api_params={\"model\": \"google/gemma-4-26B-A4B-it\", \"provider\": \"deepinfra\"},\n",
413413
" generation_kwargs={\"max_tokens\": 1024},\n",
414414
" ),\n",
415415
")\n",
@@ -449,7 +449,7 @@
449449
"id": "ZJueu_V4KP6w"
450450
},
451451
"source": [
452-
"{'llm': {'replies': [ChatMessage(_role=<ChatRole.ASSISTANT: 'assistant'>, _content=[TextContent(text='To make **vegan keto eggplant lasagna**, **vegan persimmon flan**, and **vegan hemp cheese**, based on the provided context, here are the required ingredients for each dish:\\n\\n---\\n\\n### 🥘 **Vegan Keto Eggplant Lasagna**\\n\\n**Ingredients:**\\n- 2 large eggplants \\n- A lot of salt (to draw out water; rub both sides) \\n- 1/3 cup pesto (made with: 4 oz basil, 1/4 cup almonds, 1/4 cup nutritional yeast, 1/4 cup olive oil) \\n- 1/2 cup store-bought vegan mozzarella (or optional layer of Violife shredded mozz or Miyoko’s) \\n- 1 recipe spinach tofu ricotta (made with: 14 oz firm/extra firm tofu, 10 oz spinach, 1 tsp garlic powder, juice of 1/2 lemon, salt to taste) \\n- Optional: 1 layer of store-bought vegan cheese on top \\n\\n**Notes:** \\n- Eggplant is roasted, salted, and then layered with pesto, cheese, and spinach tofu ricotta. \\n- The dish is keto-friendly due to the use of minimal carbohydrates (spinach and tofu are low-carb, and pesto/nutritional yeast are low in net carbs). \\n- Do not freeze eggplant; store in fridge for up to a few days.\\n\\n---\\n\\n### 🥣 **Vegan Persimmon Flan**\\n\\n**Ingredients:**\\n- ½ cup persimmon pulp (strained from 2 average-sized fuyu persimmons; seeds removed) \\n- 1 tbsp cornstarch \\n- ½ tsp agar agar \\n- 1 tbsp agave nectar (or to taste) \\n- 2 tbsp granulated sugar \\n- ¼ cup coconut cream \\n- ½ cup almond milk \\n- ½ tsp vanilla \\n\\n**Notes:** \\n- Cook the mixture in a saucepan, bring to a boil, and simmer. \\n- Cool slightly, stir in vanilla, then refrigerate for at least 4 hours or overnight. \\n- Serves 2 (written during pandemic, so small batch). \\n- This is a low-carb, keto-friendly dessert option.\\n\\n---\\n\\n### 🥛 **Vegan Hemp Cheese** (Note: This is a *hemp-based* cheese, not from the macadamia nut cheese)\\n\\n**Ingredients:**\\n- ½ cup sunflower seeds (soaked overnight or boiled for 15 minutes) \\n- ½ cup hemp hearts \\n- 1.5 teaspoons miso paste \\n- 1 tsp nutritional yeast \\n- ¼ cup rejuvelac \\n- 1/4 tsp salt (or to taste) \\n\\n**Instructions (from context):** \\n- Blend all ingredients in a blender or food processor. \\n- Transfer to a clean glass bowl, cover with a dish towel and rubber band. \\n- Culture at room temperature (not in direct sunlight) for 24–48 hours. \\n- The cheese will become tangy, like sourdough bread. \\n\\n**Note:** This is a fermented, low-carb, plant-based cheese. It’s not keto-friendly in large amounts due to carbs from seeds and miso, but it can be consumed in small portions. \\n\\n---\\n\\n### ✅ Final Answer:\\n\\n**Ingredients needed:**\\n\\n#### For **Vegan Keto Eggplant Lasagna**:\\n- 2 large eggplants \\n- Salt (a lot) \\n- 1/3 cup pesto (basil, almonds, nutritional yeast, olive oil) \\n- 1/2 cup store-bought vegan mozzarella (e.g., Violife or Miyoko’s) \\n- 14 oz firm tofu \\n- 10 oz spinach \\n- 1 tsp garlic powder \\n- Juice of 1/2 lemon \\n- Salt to taste \\n\\n#### For **Vegan Persimmon Flan**:\\n- ½ cup persimmon pulp (from 2 fuyu persimmons) \\n- 1 tbsp cornstarch \\n- ½ tsp agar agar \\n- 1 tbsp agave nectar \\n- 2 tbsp granulated sugar \\n- ¼ cup coconut cream \\n- ½ cup almond milk \\n- ½ tsp vanilla \\n\\n#### For **Vegan Hemp Cheese**:\\n- ½ cup sunflower seeds (soaked or boiled) \\n- ½ cup hemp hearts \\n- 1.5 tsp miso paste \\n- 1 tsp nutritional yeast \\n- ¼ cup rejuvelac \\n- 1/4 tsp salt \\n\\n> ✅ All dishes are vegan. The eggplant lasagna is keto-friendly due to low-carb ingredients. The flan and hemp cheese are also low-carb, though the hemp cheese has some carbs from seeds and miso. \\n\\nThis combination gives a balanced, plant-based, and keto-friendly meal and dessert pairing.')], _name=None, _meta={'model': 'Qwen/Qwen3-4B-Instruct-2507', 'finish_reason': 'stop', 'index': 0, 'usage': {'prompt_tokens': 2010, 'completion_tokens': 1023}})]}}"
452+
"{'llm': {'replies': [ChatMessage(_role=<ChatRole.ASSISTANT: 'assistant'>, _content=[TextContent(text=\"Based on the context provided, here are the ingredients needed for each recipe:\\n\\n**Vegan Keto Eggplant Lasagna**\\n* **For the eggplant:** 2 large eggplants, a lot of salt, and olive oil.\\n* **For the Pesto:** 4 oz basil, 1/4 cup almonds, 1/4 cup nutritional yeast, and 1/4 cup olive oil.\\n* **For the Spinach Tofu Ricotta/Cheese:** 14 oz firm or extra firm tofu, 10 oz spinach, juice of 1 lemon, 1 tsp garlic powder, and salt to taste.\\n* **For Macadamia Nut Cheese:** 1 cup macadamia nuts (unsalted unroasted recommended).\\n* **Optional topping:** Store-bought vegan mozzarella (such as Violife shredded mozz or Miyoko's).\\n\\n**Vegan Persimmon Flan**\\n* ½ cup persimmon pulp (strained from approximately 2 average sized fuyu persimmons)\\n* 1 tbsp cornstarch\\n* ½ tsp agar agar\\n* 1 tbsp agave nectar (or to taste)\\n* 2 tbsp granulated sugar\\n* ¼ cup coconut creme\\n* ½ cup almond milk\\n* ½ tsp vanilla\\n\\n**Vegan Hemp Cheese**\\n* ½ cup sunflower seeds\\n* ½ cup hemp hearts\\n* 1.5 teaspoons miso paste\\n* 1 tsp nutritional yeast\\n* ¼ cup rejuvelac\\n* 1/4 teaspoon salt (or to taste)\")], _name=None, _meta={'model': 'google/gemma-4-26B-A4B-it', 'finish_reason': 'stop', 'index': 0, 'usage': {'prompt_tokens': 1957, 'completion_tokens': 322}})]}}"
453453
]
454454
},
455455
{

0 commit comments

Comments
 (0)