We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
# Colab Env to Run llama3.1
import torch from langchain_huggingface import HuggingFacePipeline from transformers import AutoModelForCausalLM, AutoTokenizer,pipeline model_id = "meta-llama/Meta-Llama-3.1-8B" tokenizer = AutoTokenizer.from_pretrained(model_id,skip_special_tokens=True) model = AutoModelForCausalLM.from_pretrained(model_id, device_map='balanced') pipe = pipeline( "text-generation", model=model, tokenizer=tokenizer, max_new_tokens=256, temperature=0, do_sample=False, return_full_text=False ) from langchain_huggingface import HuggingFacePipeline llm = HuggingFacePipeline(pipeline=pipe)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
# Colab Env to Run llama3.1
The text was updated successfully, but these errors were encountered: