Llama3.1-8B-Finance / README.md
Chimmyy's picture
Update README.md
a812884 verified
---
base_model: unsloth/Meta-Llama-3.1-8B-bnb-4bit
language:
- en
license: apache-2.0
tags:
- text-generation-inference
- transformers
- unsloth
- llama
- trl
---
# How to Use
```bash
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "Chimmyy/Llama3.1-8B-Finance",
max_seq_length = 1024,
dtype = None,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
inputs = tokenizer(
[
prompt.format(
"What are the advantages of investing in bonds?", # instruction
"", # input
"", # output - leave empty for model
)
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True) # Change max_new_tokens as needed
result = tokenizer.batch_decode(outputs)
print(result)
```
# Uploaded model
- **Developed by:** Chimmyy
- **License:** apache-2.0
- **Finetuned from model :** unsloth/Meta-Llama-3.1-8B-bnb-4bit
This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)