anamikac2708 commited on
Commit
14a9faa
1 Parent(s): 1d8689b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -32,8 +32,9 @@ Model then converted Q5_K_M gguf using llama.cpp https://github.com/ggerganov/ll
32
 
33
  2. ## Run the model
34
 
35
- ```
36
  from transformers import AutoTokenizer
 
37
  tokenizer = AutoTokenizer.from_pretrained('meta-llama/Meta-Llama-3-8B')
38
  example = [{'content': 'You are a financial expert and you can answer any questions related to finance. You will be given a context and a question. Understand the given context and\n try to answer. Users will ask you questions in English and you will generate answer based on the provided CONTEXT.\n CONTEXT:\n D. in Forced Migration from the University of the Witwatersrand (Wits) in Johannesburg, South Africa; A postgraduate diploma in Folklore & Cultural Studies at Indira Gandhi National Open University (IGNOU) in New Delhi, India; A Masters of International Affairs at Columbia University; A BA from Barnard College at Columbia University\n', 'role': 'system'}, {'content': ' In which universities did the individual obtain their academic qualifications?\n', 'role': 'user'}, {'content': ' University of the Witwatersrand (Wits) in Johannesburg, South Africa; Indira Gandhi National Open University (IGNOU) in New Delhi, India; Columbia University; Barnard College at Columbia University.', 'role': 'assistant'}]
39
  prompt = tokenizer.apply_chat_template(example[:2], tokenize=False, add_generation_prompt=True)
 
32
 
33
  2. ## Run the model
34
 
35
+ ```python
36
  from transformers import AutoTokenizer
37
+ from llama_cpp import Llama
38
  tokenizer = AutoTokenizer.from_pretrained('meta-llama/Meta-Llama-3-8B')
39
  example = [{'content': 'You are a financial expert and you can answer any questions related to finance. You will be given a context and a question. Understand the given context and\n try to answer. Users will ask you questions in English and you will generate answer based on the provided CONTEXT.\n CONTEXT:\n D. in Forced Migration from the University of the Witwatersrand (Wits) in Johannesburg, South Africa; A postgraduate diploma in Folklore & Cultural Studies at Indira Gandhi National Open University (IGNOU) in New Delhi, India; A Masters of International Affairs at Columbia University; A BA from Barnard College at Columbia University\n', 'role': 'system'}, {'content': ' In which universities did the individual obtain their academic qualifications?\n', 'role': 'user'}, {'content': ' University of the Witwatersrand (Wits) in Johannesburg, South Africa; Indira Gandhi National Open University (IGNOU) in New Delhi, India; Columbia University; Barnard College at Columbia University.', 'role': 'assistant'}]
40
  prompt = tokenizer.apply_chat_template(example[:2], tokenize=False, add_generation_prompt=True)