tatsu-lab/alpaca
Viewer β’ Updated β’ 52k β’ 80.4k β’ 1.09k
How to use pranjalsingh/alpaca-Llama-3.1-70B-Instruct-chat with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.3-70B-Instruct")
model = PeftModel.from_pretrained(base_model, "pranjalsingh/alpaca-Llama-3.1-70B-Instruct-chat")pranjalsingh/alpaca-Llama-3.1-70B-Instruct-chat
A LoRA fine-tuned version of the meta-llama/Llama-3.1-70B-Instruct model on the Alpaca dataset, optimized using PEFT and accelerated on Intel Gaudi3 HPU hardware.
This model is a fine-tuned variant of LLaMA 3.1 70B Instruct, trained on the Alpaca dataset using Parameter-Efficient Fine-Tuning (PEFT) via LoRA. The goal of this fine-tuning was to improve instruction-following performance on lightweight resources, leveraging Intelβs Gaudi3 HPU for efficient training.
meta-llama/Llama-3.1-70B-Instructpranjalsingh/alpaca-Llama-3.1-70B-Instruct-chatUse the model as an instruction-following chatbot or in downstream applications requiring LLM completion with lightweight deployment using LoRA adapters.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-70B-Instruct")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-70B-Instruct")
model = PeftModel.from_pretrained(base_model, "pranjalsingh/alpaca-Llama-3.1-70B-Instruct-chat")
inputs = tokenizer("### Instruction: Explain quantum computing in simple terms.", return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
| Metric | Value |
|---|---|
| Eval Accuracy | 73.27% |
| Eval Loss | 1.02 |
| Perplexity | 2.79 |
| Evaluation Runtime | 20.97s |
| Samples Evaluated | 101 |
| Samples/Sec | 4.82 |
| Max Memory Used (GB) | 126.2 |
| Total Available Memory | 126.54 GB |
| Memory Allocated (GB) | 41.06 |
meta-llama/Llama-3.1-70B-Instruct| Parameter | Value |
|---|---|
| Compute Platform | Intel Gaudi3 |
| Cards Used | 8Γ HPU |
| Training Duration | ~2 Epochs |
| Region | [More info needed] |
| Emission Estimate | [Use MLCO2 to calculate] |
Coming soon.
Base model
meta-llama/Llama-3.1-70B