# Running on\_finetuned\_output = non\_finetuned("Tell me how to train my dog to sit") locally got KeyError: Production.key

**URL:** <https://community.deeplearning.ai/t/running-on-finetuned-output-non-finetuned-tell-me-how-to-train-my-dog-to-sit-locally-got-keyerror-production-key/429631>\
**Category:** Finetuning Large Language Models\
**Created:** [August 27, 2023, 4:13pm UTC](https://community.deeplearning.ai/t/running-on-finetuned-output-non-finetuned-tell-me-how-to-train-my-dog-to-sit-locally-got-keyerror-production-key/429631 "2023-08-27T16:13:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy\_zhu](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@andy\_zhu](https://community.deeplearning.ai/u/andy_zhu)\
**Post date:** [August 27, 2023, 4:13pm UTC](https://community.deeplearning.ai/t/running-on-finetuned-output-non-finetuned-tell-me-how-to-train-my-dog-to-sit-locally-got-keyerror-production-key/429631/1 "2023-08-27T16:13:24Z")

</div>

When I figured out to install lamini locally and trying the 1st lesson, I got the keyerror: production.key when I run **on\_finetuned\_output = non\_finetuned(“Tell me how to train my dog to sit”)**

---

<div class="post-metadata">

**Author:** ![Adam\_Hjerpe](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Adam\_Hjerpe](https://community.deeplearning.ai/u/Adam_Hjerpe)\
**Post date:** [August 27, 2023, 5:37pm UTC](https://community.deeplearning.ai/t/running-on-finetuned-output-non-finetuned-tell-me-how-to-train-my-dog-to-sit-locally-got-keyerror-production-key/429631/2 "2023-08-27T17:37:50Z")

</div>

Could it be that you are not adding the API key from lamini? See the attached example code,

```auto
def authorize_lamini():
    _ = load_dotenv(find_dotenv())
    lamini_api_key = os.environ['LAMINI_API_KEY']
    llm = LLMEngine(
        id="exploring",
        config={
            "production": {
                "key": lamini_api_key,
            }
        },
    )

```

---

<div class="post-metadata">

**Author:** ![Beejay](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/beejay/32/53009_2.png) [@Beejay](https://community.deeplearning.ai/u/Beejay)\
**Post date:** [October 26, 2023, 7:28pm UTC](https://community.deeplearning.ai/t/running-on-finetuned-output-non-finetuned-tell-me-how-to-train-my-dog-to-sit-locally-got-keyerror-production-key/429631/3 "2023-10-26T19:28:22Z")

</div>

Same issue here.  
And I got the Lamini API key.  
Do you also need a key from Hugging Face since the library comes from there (meta-llama/Llama-2-7b-hf)

---

<div class="post-metadata">

**Author:** ![snovotny](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@snovotny](https://community.deeplearning.ai/u/snovotny)\
**Post date:** [November 1, 2023, 4:56pm UTC](https://community.deeplearning.ai/t/running-on-finetuned-output-non-finetuned-tell-me-how-to-train-my-dog-to-sit-locally-got-keyerror-production-key/429631/4 "2023-11-01T16:56:12Z")

</div>

Try the following in the previous line:

non\_finetuned = BasicModelRunner(“meta-llama/Llama-2-7b-hf”, config={  
“production”: {  
“key”: lamini\_api\_key}})
