import transformers

from transformers import LlamaForCausalLM, LlamaTokenizer

tokenizer = LlamaTokenizer.from_pretrained('/data/models/llama-7b-hf')

prompt = "I believe the meaning of life is"
inputs = tokenizer(prompt, return_tensors='pt')
print("[INFO] prompt to inputs ids: \n", inputs.input_ids)
model = LlamaForCausalLM.from_pretrained("/data/models/llama-7b-hf")

tokens = [306, 4658, 278, 6593, 310, 2834, 338, 304, 5735, 372, 304, 278, 2989, 342, 29889, 306, 4658, 393, 591, 526, 599, 1244, 363, 263, 2769, 322, 393, 591, 526, 599, 1244, 304, 1371, 1269, 916, 29889, 306, 4658, 393]
print("[INFO] output tokens id to prompt", tokenizer.decode(tokens))
