Building the Future of Local AI, One Local Model at a Time.

Practical deep-dives into AI engineering, local LLMs, and custom software infrastructure optimized for consumer hardware.

local_inference.py
import llama_cpp

llm = llama_cpp.Llama(
    model_path="gemma-4-12b-it-qat.gguf",
    n_ctx=131072,
    n_gpu_layers=-1
)

print("Initializing local session...")

Louisiana-style red beans and rice

Prep Time Soak Time Cook Time Yield
20 mins 8+ hrs (overnight) 2 hrs 6-8 servings

Equipment

  • Large pot (enameled Dutch oven or ceramic nonstick, big enough for 7-8 cups of liquid plus the beans)
  • Medium saucepan with a tight-fitting lid
  • Bamboo spatula
  • Silicone slotted spoon
  • Silicone whisk
  • Garlic press
  • Pepper grinder
  • Large bowl, for soaking

Ingredients

Meat

  • 14 oz Andouille sausage, sliced into rounds
  • 1.5 lb smoked turkey leg, pre-cooked

Aromatics

  • 1 large yellow onion, diced
  • 2 celery ribs, finely chopped
  • 1 small red bell pepper, finely chopped
  • 1 small green bell pepper, finely chopped
  • 8 garlic cloves, peeled and pressed

Roux

  • 3 tbsp unsalted butter
  • 3 tbsp all-purpose flour

Seasoning blend

  • 2 tsp dried oregano
  • 2 tsp onion powder
  • 2 tsp garlic powder
  • 1 tsp paprika
  • 1 tsp black pepper, freshly cracked
  • ½ tsp dried thyme
  • ½ tsp ground cayenne pepper
  • 1 pinch crushed red pepper
  • 1 pinch sea salt

Beans and liquid

  • 1 lb dry small red beans
  • 7-8 cups water
  • 7-8 tsp Better Than Bouillon Base (Chicken), 1 tsp per cup of water
  • 2 large or medium bay leaves, or 4 small

Rice

  • 2 cups long-grain white rice
  • 4 cups water

Garnish

  • Fresh parsley, chopped (optional)
  • Scallions, thinly sliced (optional)

Instructions

1. The night before

  1. Soak the beans: Put the dry red beans in a large bowl and cover with plain water by a couple of inches. They’ll swell, so leave room. Soak at least 8 hours or overnight, then drain.
  2. Prep the turkey (optional): Cook the smoked turkey leg the day before if you want, pull the meat off the bone, and refrigerate it overnight. The bone doesn’t go in the pot with this version. Otherwise the whole leg goes into the pot in step 5.

2. Brown the sausage

  1. Preheat the large pot over medium heat.
  2. Add the Andouille and cook until browned on both sides.
  3. Pull the sausage out with the silicone slotted spoon and set it aside. Leave the rendered fat in the pot; the vegetables cook in it next, and that fat is where a lot of the pot’s smoke and spice comes from.

3. Cook the vegetables

  1. Add the onion and cook until soft and translucent, 3-4 minutes.
  2. Add the celery and both bell peppers. Cook until softened, 4-5 minutes.
  3. Add the garlic last and cook about 1 minute, until fragrant. Pressed garlic scorches fast, and burnt garlic turns the whole pot bitter, so it gets the shortest time.

4. Build the roux and bloom the spices

  1. Add the 3 tbsp butter and let it melt into the vegetables.
  2. Sprinkle the 3 tbsp flour over the top and stir with the bamboo spatula for 1-2 minutes to cook out the raw flour taste. This roux gets built right on the vegetables instead of in a separate pan; it stays pale, which is fine here because the beans do most of the thickening later.
  3. Stir in the whole seasoning blend, including the pinch of sea salt, and let it cook for a minute or two before any liquid goes in. Hot fat pulls flavor out of dried spices, and liquid doesn’t. Keep the salt to a pinch; the Andouille and the bouillon both carry plenty.

5. Add the liquid and beans

  1. Return the Andouille to the pot.
  2. Stir the bouillon base into the water until dissolved (a silicone whisk helps).
  3. Pour the liquid in slowly, scraping up the browned bits from the bottom with the bamboo spatula.
  4. Add the bay leaves and bring to a rolling boil.
  5. Add the soaked, drained beans and the turkey. If you cooked the leg the day before, add the picked meat. Otherwise add the whole leg.

6. Simmer

  1. Reduce the heat to low and set the lid at an angle. The gap lets steam out, so the liquid reduces and thickens while the pot stays at a gentle simmer. Cook about 2 hours, stirring occasionally so the bottom doesn’t stick.
  2. The beans are done when they’re tender.
  3. If you used the whole leg, pull it out, shred the meat off the bone, and stir the meat back in. Discard the bone.
  4. Mash a portion of the beans against the side of the pot with the bamboo spatula and stir them back in. The starch in the crushed beans thickens the liquid into gravy.

7. Make the rice

  1. About 20 minutes before the beans are done, rinse the rice in a fine strainer until the water runs mostly clear. Rinsing washes off surface starch, which is what makes rice gummy. Do it every time.
  2. Combine the rinsed rice and water in the saucepan. No salt.
  3. Bring to a boil, cover with the tight lid, reduce to low, and simmer 15-20 minutes, until the water is absorbed. Fluff with a fork.

8. Serve

  1. Pull out the bay leaves.
  2. Taste the beans and adjust the salt now, when you can judge the finished pot.
  3. Ladle the beans over the rice. Top with parsley and scallions if you want them.

Notes & storage

  • Make ahead: Soak the beans overnight. Cook the turkey leg and pick the meat the day before.
  • Storage: Freeze in batches.
  • Reheating: Microwave.