# Error With Semantic Kernel using HF open source model

**URL:** <https://community.deeplearning.ai/t/error-with-semantic-kernel-using-hf-open-source-model/444386>\
**Category:** ChatGPT Prompt Engineering for Developers\
**Created:** [September 13, 2023, 1:03pm UTC](https://community.deeplearning.ai/t/error-with-semantic-kernel-using-hf-open-source-model/444386 "2023-09-13T13:03:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhrecaldeb](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/mhrecaldeb/32/48988_2.png) [@mhrecaldeb](https://community.deeplearning.ai/u/mhrecaldeb)\
**Post date:** [September 13, 2023, 1:03pm UTC](https://community.deeplearning.ai/t/error-with-semantic-kernel-using-hf-open-source-model/444386/1 "2023-09-13T13:03:34Z")

</div>

Hi there,  
Hope someone can help on this subject.  
I am going through and trying to use an Hugging Face model to be used creating and then using semantic functions.  
I am trying to reproduce the lab in my Google Colab using a T4 GPU.  
First, I had to install a couple of requirements but everything went fine.  
I was able to upload this model: “microsoft/phi-1\_5” and other relatively small models, because of memory restrictions.  
I was able to create a kernel, all fine until that point.  
I was able to create a semantic function.  
I was able to add context elements to the function.  
\Then when trying to use the function with:  
“result = await kernel.run\_async(shift\_domain\_function, input\_context=my\_context)”  
I got some warnings:  
"/usr/local/lib/python3.10/dist-packages/transformers/generation/configuration\_utils.py:362: UserWarning: `do_sample` is set to `False`. However, `temperature` is set to `0.1` – this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `temperature`. This was detected when initializing the generation config instance, which means the corresponding file may hold incorrect parameterization and should be fixed.  
warnings.warn(

/usr/local/lib/python3.10/dist-packages/transformers/generation/configuration\_utils.py:367: UserWarning: `do_sample` is set to `False`. However, `top_p` is set to `0.5` – this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `top_p`. This was detected when initializing the generation config instance, which means the corresponding file may hold incorrect parameterization and should be fixed.  
warnings.warn("

And the result display the following error:  
“Error: (‘Hugging Face completion failed’, TypeError(”‘NoneType’ object is not callable"), None)"

I have tried to find out this by myself with no luck. Hope someone can help!

Thanks  
Mario
