Downloads · 30 days
211
0% of all-time downloads
FinGPT/fingpt-forecaster_dow30_llama2-7b_lora
fingpt-forecaster_dow30_llama2-7b_lora is a machine learning model from FinGPT. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
Check out our github: https://github.com/AI4Finance-Foundation/FinGPT/tree/master/fingpt/FinGPTForecaster
Downloads · 30 days
211
0% of all-time downloads
All-time downloads
78K
Public
Repo size
80.2 MB
Likes
157
Public
Click a slice to open those files.
.bin40.1 MB · 50%
From the Hugging Face model README
Check out our github: https://github.com/AI4Finance-Foundation/FinGPT/tree/master/fingpt/FinGPT_Forecaster
from datasets import load_dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
'meta-llama/Llama-2-7b-chat-hf',
trust_remote_code=True,
device_map="auto",
torch_dtype=torch.float16, # optional if you have enough VRAM
)
tokenizer = AutoTokenizer.from_pretrained('meta-llama/Llama-2-7b-chat-hf')
model = PeftModel.from_pretrained(base_model, 'FinGPT/fingpt-forecaster_dow30_llama2-7b_lora')
model = model.eval()