Offline LLMs #813
Unanswered
Hrishikesh007788
asked this question in
Q&A
Replies: 5 comments 2 replies
|
Same question, I can't find the way to do it |
0 replies
|
Are you trying with LM Studio? |
0 replies
|
@Hrishikesh007788 Just import the local LLM you want to use via langchain and pass it to a Example: from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
model_id = "gpt2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, max_new_tokens=100)
llm = HuggingFacePipeline(pipeline=pipe)
df = SmartDataframe(..., config={"llm": llm})Hope this helps. |
1 reply
|
I tried this, and always get empty LLM object.... |
1 reply
|
okay, what eventually worked for me is to disable caching. If I don't disable caching, then the smartdataframe basically hangs and quits |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
@gventuri Is there a way to connect pandasai with LLM in our local machine completely offline? And is there is way to serve the local LLM in a server such that anyone can access it?
All reactions