Spaces:
Sleeping
Sleeping
AjithBharadwaj
commited on
Update main.py
Browse files
main.py
CHANGED
@@ -6,8 +6,8 @@ from langchain_core.prompts import PromptTemplate
|
|
6 |
|
7 |
quants = BitsAndBytesConfig(load_in_4bit=True)
|
8 |
model_id = "mistralai/Mistral-7B-Instruct-v0.2"
|
9 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id,
|
10 |
-
model = AutoModelForCausalLM.from_pretrained(model_id,
|
11 |
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
12 |
hf = HuggingFacePipeline(pipeline=pipe)
|
13 |
|
|
|
6 |
|
7 |
quants = BitsAndBytesConfig(load_in_4bit=True)
|
8 |
model_id = "mistralai/Mistral-7B-Instruct-v0.2"
|
9 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id,quantization_config=quants)
|
10 |
+
model = AutoModelForCausalLM.from_pretrained(model_id,quantization_config=quants)
|
11 |
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
12 |
hf = HuggingFacePipeline(pipeline=pipe)
|
13 |
|