metadata
language:
- en
tags:
- llama
- peft
- lora
license: apache-2.0
llama-400m-lora-finetuned_qlora
LoRA-finetuned Llama model for improved performance
Model Details
This model is a LoRA-finetuned version of YongganFu/Llama-400M-12L.
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "lxaw/llama-400m-lora-finetuned_qlora"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Example usage
input_text = "What is the capital of France?"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(inputs.input_ids, max_length=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Example Output
Input: What is the capital of France?
Output: What is the capital of France?
The capital of France is Paris, located in the heart of France. It is the largest city in France and the second-largest city in the European Union. The capital is also the official residence