Downloads · 30 days
0
0% of all-time downloads
aliRafik/Muse_Glimmer_30B_finetuned_mlabonne_16bit
Muse_Glimmer_30B_finetuned_mlabonne_16bit is a machine learning model from aliRafik. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Developed by: aliRafik License: apache-2.0 Finetuned from model: unsloth/Muse-Glimmer-30B
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
3
Public
Repo size
447 MB
Likes
0
Public
Click a slice to open those files.
.safetensors419 MB · 94%
From the Hugging Face model README
LoRA adapter for unsloth/Muse-Glimmer-30B, a 30B parameter vision-language model. Fine-tuned using parameter-efficient LoRA on Kaggle with 2x T4 GPUs.
Model Architecture:
| Configuration | Value |
|---|---|
| Hardware | 2x NVIDIA T4 (16GB each) |
| Platform | Kaggle |
| Framework | Unsloth + PEFT |
| LoRA Rank (r) | 16 |
| LoRA Alpha | 16 |
| LoRA Dropout | 0.0 |
| Target Modules | Attention, MLP |
| Vision Layers | Frozen |
| Language Layers | Trainable |
| Effective Batch Size | 16 |
| Learning Rate | 2e-4 |
| Optimizer | AdamW 8-bit |
| Warmup Steps | 10 |
| Weight Decay | 0.01 |
| Max Sequence Length | 2048 |
| Quantization | 4-bit (for loading) |
| Adapter Size | 0.66 GB |
pip install transformers accelerate peft torch bitsandbytes
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model with 4-bit quantization
base_model = AutoModelForCausalLM.from_pretrained(
"unsloth/Muse-Glimmer-30B",
torch_dtype=torch.float16,
load_in_4bit=True,
device_map="auto"
)
# Load LoRA adapter
model = PeftModel.from_pretrained(
base_model,
"aliRafik/Muse-Glimmer-30B-finetuned-mlabonne"
)
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(
"aliRafik/Muse-Glimmer-30B-finetuned-mlabonne"
)
def generate_response(prompt, max_length=256):
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=max_length,
temperature=0.7,
do_sample=True,
top_p=0.9,
repetition_penalty=1.1,
pad_token_id=tokenizer.eos_token_id
)
return tokenizer.decode(
outputs[0],
skip_special_tokens=True
)
# Example
response = generate_response("Your prompt here")
print(response)
| Precision | GPU Memory Required |
|---|---|
| 4-bit (Recommended) | ~12 GB |
| 8-bit | ~18 GB |
| 16-bit (FP16) | ~35 GB |
This is a LoRA adapter, not a standalone model. Must be loaded with the base Muse Glimmer 30B model.
@misc{muse-glimmer-30b-lora-2024,
author = {Ali Rafik},
title = {Muse Glimmer 30B - LoRA Fine-tuned Adapter},
year = {2024},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/aliRafik/Muse-Glimmer-30B-finetuned-mlabonne}}
}