skip to Main Content

Ubuntu – HuggingFacePipeline and Langchain

this is my current code: from langchain.llms import HuggingFacePipeline from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, BitsAndBytesConfig from langchain import PromptTemplate, LLMChain import torch model_id = "../models/openbuddy-llama2-34b-v11.1-bf16" tokenizer = AutoTokenizer.from_pretrained(model_id) nf4_config = BitsAndBytesConfig( load_in_4bit=True, bnb_4bit_compute_dtype=torch.bfloat16, bnb_4bit_quant_type='nf4', bnb_4bit_use_double_quant=False, max_memory=24000 ) model =…

VIEW QUESTION

Twitter-api – 403 Forbidden 453 – You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints only

I had registered for Free level Twitter API recently and I would like to use Tweepy to help me in extracting tweets from user. api_key = config['twitter']['api_key'] api_secret = config['twitter']['api_key_secret'] access_token = config['twitter']['access_token'] access_token_secret = config['twitter']['access_token_secret'] auth = tweepy.OAuthHandler(api_key, api_secret)…

VIEW QUESTION
Back To Top
Search