Instructions to use leonzc/llama400m-wikitext2-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use leonzc/llama400m-wikitext2-merged with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
llama400m-wikitext2-merged
DoRA fine-tuned LLaMA 400M model on Wikitext-2 using LMFlow
Model Details
This model is a DoRA-finetuned version of data4elm/Llama-400M-12L. The standalone adapter is available at leonzc/llama400m-wikitext2-dora-adapter.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Option 1: Load the complete model directly
model = AutoModelForCausalLM.from_pretrained("leonzc/llama400m-wikitext2-merged")
tokenizer = AutoTokenizer.from_pretrained("leonzc/llama400m-wikitext2-merged")
# Option 2: Load just the adapter with the base model
base_model = AutoModelForCausalLM.from_pretrained("data4elm/Llama-400M-12L")
tokenizer = AutoTokenizer.from_pretrained("data4elm/Llama-400M-12L")
model = PeftModel.from_pretrained(base_model, "leonzc/llama400m-wikitext2-dora-adapter")
# 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))
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for leonzc/llama400m-wikitext2-merged
Base model
data4elm/Llama-400M-12L