Downloads · 30 days
18
1% of all-time downloads
Syed-Hasan-8503/Llama-3-8B-NOLA
Llama-3-8B-NOLA is a text generation model from Syed-Hasan-8503. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
18
1% of all-time downloads
All-time downloads
3.4K
Public
Parameters
8B
16.1 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README

Llama-3-8B-NOLA is a fine-tuned variant of meta-llama/Meta-Llama-3-8B on OpenAssistant/oasst1 for 100 steps only. The goal of this experiment was to try out this new technique NOLA and see the the number of trainable parameters. Due to limited compute, the results of this experiment might not be satisfactory. 1x A5000 was used for this experiment.
NOLA is a novel approach for fine-tuning large models such as LLMs and Vision Transformers. Similar to LoRA, NOLA uses a low-rank decomposition of weight matrices for the fine-tuning step. However, LoRA face two primary limitations:
NOLA brings parameter count felexiblity to LoRA. NOLA achieves this by re-parameterizing the low-rank matrices in LoRA using linear combinations of randomly generated matrices (basis) and optimizing the linear coefficients only. This approach allows us to decouple the number of trainable parameters from both the choice of rank and the network architecture.
***** train metrics ***** epoch = 0.0907 total_flos = 4091386GF train_loss = 1.618 train_runtime = 2:02:24.94 train_samples_per_second = 0.109 train_steps_per_second = 0.014
***** eval metrics ***** epoch = 0.0907 eval_loss = 1.5115 eval_runtime = 0:11:33.00 eval_samples_per_second = 0.144 eval_steps_per_second = 0.144
!pip install -qU transformers accelerate bitsandbytes
from transformers import AutoTokenizer
import transformers
import torch
model = "Syed-Hasan-8503/Llama-3-8B-NOLA"
tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
model_kwargs={"torch_dtype":torch.bfloat16,"load_in_4bit":True}
)
prompt = '''What is Machine Learning?'''
prompt = f"""{prompt}"""
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])