Subha95 commited on
Commit
0ee7c79
·
verified ·
1 Parent(s): 7defe17

Update chatbot_rag.py

Browse files
Files changed (1) hide show
  1. chatbot_rag.py +5 -1
chatbot_rag.py CHANGED
@@ -42,7 +42,11 @@ def build_qa():
42
 
43
  model_id = "meta-llama/Llama-3.2-3B-Instruct"
44
  tokenizer = AutoTokenizer.from_pretrained(model_id)
45
- model = AutoModelForCausalLM.from_pretrained( model_id, device_map="auto", trust_remote_code=True # ensures it runs on available CPU )
 
 
 
 
46
  pipe = pipeline(
47
  "text-generation",
48
  model=model,
 
42
 
43
  model_id = "meta-llama/Llama-3.2-3B-Instruct"
44
  tokenizer = AutoTokenizer.from_pretrained(model_id)
45
+ model = AutoModelForCausalLM.from_pretrained(
46
+ model_id,
47
+ device_map="auto",
48
+ trust_remote_code=True # ensures it runs on available CPU
49
+ )
50
  pipe = pipeline(
51
  "text-generation",
52
  model=model,