# Llama 2 don't reponse prompt invokes

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama-2-dont-reponse-prompt-invokes%2F72599%3E%5C
**Category:** Models\
**Created:** [February 9, 2024, 11:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama-2-dont-reponse-prompt-invokes%2F72599 "2024-02-09T23:35:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrokenSoul](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/brokensoul/32/29609_2.png) [@BrokenSoul](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBrokenSoul)%5C
**Post date:** [February 9, 2024, 11:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fllama-2-dont-reponse-prompt-invokes%2F72599%2F1 "2024-02-09T23:35:16Z")

</div>

Hi, I am beggining with llama 2 7b chat. I was using it with LangChain, but I get empy value:

```auto
import os

os.environ['HUGGINGFACEHUB_API_TOKEN'] = "token here"

from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline

model_id = "meta-llama/Llama-2-7b-chat"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, max_new_tokens=500)
hf = HuggingFacePipeline(pipeline=pipe)

from langchain.prompts import PromptTemplate

template = """Question: {question}
Answer: Let's think step by step."""
prompt = PromptTemplate.from_template(template)
chain = prompt | hf
question = "What is AI?"

# ------------ empty ------------------
print(chain.invoke({"question": question})) 
# -------------------------------------

```

I tried it with “TinyLlama/TinyLlama-1.1B-Chat-v1.0” and I got the prompt invoke, but don’t with llama 2.

I used HuggingFaceHub recently and got the message that some models need a pro subscription, does llama 2 need a subscription when I use transformers?

Thanks.
