Spaces:
Running
Running
AjithBharadwaj
commited on
Update main.py
Browse files
main.py
CHANGED
@@ -1,19 +1,18 @@
|
|
1 |
from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
|
2 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline,BitsAndBytesConfig
|
3 |
# import accelerate
|
4 |
# import bitsandbytes
|
5 |
from langchain_core.prompts import PromptTemplate
|
6 |
|
7 |
-
|
8 |
# model_id = "mistralai/Mistral-7B-Instruct-v0.2"
|
9 |
|
10 |
from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
|
11 |
|
12 |
hf = HuggingFacePipeline.from_model_id(
|
13 |
-
model_id="
|
14 |
task="text-generation",
|
15 |
-
pipeline_kwargs={"max_new_tokens": 10000}
|
16 |
-
model_kwargs={"quantization_config":quants}
|
17 |
)
|
18 |
|
19 |
|
|
|
1 |
from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
|
2 |
+
# from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline,BitsAndBytesConfig
|
3 |
# import accelerate
|
4 |
# import bitsandbytes
|
5 |
from langchain_core.prompts import PromptTemplate
|
6 |
|
7 |
+
|
8 |
# model_id = "mistralai/Mistral-7B-Instruct-v0.2"
|
9 |
|
10 |
from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
|
11 |
|
12 |
hf = HuggingFacePipeline.from_model_id(
|
13 |
+
model_id="facebook/bart-large-cnn",
|
14 |
task="text-generation",
|
15 |
+
pipeline_kwargs={"max_new_tokens": 10000}
|
|
|
16 |
)
|
17 |
|
18 |
|