Zzc0121's picture
Update README.md
a2b6f57 verified
|
raw
history blame
600 Bytes
---
license: apache-2.0
datasets:
- HuggingFaceFW/fineweb
language:
- aa
metrics:
- code_eval
library_name: adapter-transformers
tags:
- finance
---
## Inference
``` python
from transformers import AutoModel, AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
model = "meta-llama/Llama-2-7b-chat-hf"
tokenizer = AutoTokenizer.from_pretrained(model, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model, trust_remote_code=True, device_map = 'cuda')
model = PeftModel.from_pretrained(model, "FinGPT/fingpt-forecaster_sz50_llama2-7B_lora")
model = model.eval()
```