Downloads · 30 days
0
sahaj96/Alpaca-Llama3-8B-Instruct-v1.0
Alpaca-Llama3-8B-Instruct-v1.0 is a text-to-image model from sahaj96. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as apache-2.0.
Alpaca based on Llama 3 8B Instruct 8k context length.
Downloads · 30 days
0
Access
Public
Updated Apr 20, 2024
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 54%
From the Hugging Face model README
Alpaca based on Llama 3 8B
Instruct
8k context length.
from transformers import AutoModelForCausalLM, AutoTokenizer import torch import torchvision
tokenizer = AutoTokenizer.from_pretrained("sahaj96/Alpaca-Llama3-8B-Instruct-v1.0") model = AutoModelForCausalLM.from_pretrained("sahaj96/Alpaca-Llama3-8B-Instruct-v1.0")
prompt = "A serene landscape with mountains and a lake"
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(**inputs)
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print("Generated Text:", generated_text)
output_image_path = "generated_image.png" torchvision.utils.save_image(torch.zeros((3, 256, 256)), output_image_path)
print(f"Image generated and saved at {output_image_path}")

fine-tuned from the original Alpaca-dataset entirely generated with OpenAI GPT-3.5-turbo.
Alpaca is a general model and can itself be finetuned to be specialized for specific use cases.