Downloads · 30 days
6
13% of all-time downloads
alantandrea/iam-expert-llama3.1-8b-lora
iam-expert-llama3.1-8b-lora is a machine learning model from alantandrea. 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 peft. The card lists the license as apache-2.0.
LoRA adapter trained on IAM/identity domain knowledge. Batch: eb03b33c
Downloads · 30 days
6
13% of all-time downloads
All-time downloads
46
Public
Repo size
353 MB
Likes
0
Public
Click a slice to open those files.
.safetensors336 MB · 95%
From the Hugging Face model README
LoRA adapter trained on IAM/identity domain knowledge. Batch: eb03b33c
| Metric | Value |
|---|---|
| Provider | nebius |
| Trained Tokens | 465,657 |
| Training Steps | 15 |
| Training Examples | 1035 |
| Epochs | 3 |
| Batch ID | eb03b33c |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-3.1-8B-Instruct",
device_map="auto",
torch_dtype="auto"
)
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "alantandrea/iam-expert-llama3.1-8b-lora")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B-Instruct")
# Generate
prompt = "Your question here"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
import torch
# 4-bit quantization for ~6GB VRAM
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.float16
)
base_model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-3.1-8B-Instruct",
quantization_config=bnb_config,
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, "alantandrea/iam-expert-llama3.1-8b-lora")
This adapter is released under the Apache 2.0 license. The base model may have its own license terms.