Downloads · 30 days
0
slavayosome/llama-3.2-3b-linkedin-lora
llama-3.2-3b-linkedin-lora is a text generation model from slavayosome. 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.
This repository contains a LoRA (Low-Rank Adaptation) adapter for fine-tuning Llama 3.2 3B Instruct to generate high-quality LinkedIn content.
Downloads · 30 days
0
Access
Public
Updated Jul 2, 2025
Repo size
2 GB
Likes
3
Public
Click a slice to open those files.
.safetensors2 GB · 99%
From the Hugging Face model README
This repository contains a LoRA (Low-Rank Adaptation) adapter for fine-tuning Llama 3.2 3B Instruct to generate high-quality LinkedIn content.
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
# Load base model and tokenizer
base_model_name = "unsloth/Llama-3.2-3B-Instruct"
model = AutoModelForCausalLM.from_pretrained(
base_model_name,
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
# Load LoRA adapter
model = PeftModel.from_pretrained(model, "slavayosome/llama-3.2-3b-linkedin-lora")
model = model.merge_and_unload()
# Generate content
prompt = \"\"\"### System
You are an expert LinkedIn content creator. Generate high-quality LinkedIn content based on the specified parameters.
Parameters:
- Topic: AI in business
- Tone: professional
- Format: post
- Length: medium
- Target Audience: entrepreneurs
### User
Create a medium post about AI in business in a professional tone for entrepreneurs.
### Assistant
\"\"\"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response.split("### Assistant")[-1].strip())
from huggingface_hub import snapshot_download
# Download adapter files
adapter_path = snapshot_download(repo_id="slavayosome/llama-3.2-3b-linkedin-lora")
For production use, check out the LinkedIn Content Generator API deployed on Hugging Face Spaces.
adapter_model.safetensors: LoRA adapter weights (1.8GB)adapter_config.json: LoRA configurationtokenizer.json: Tokenizer vocabularytokenizer_config.json: Tokenizer configurationspecial_tokens_map.json: Special token mappingstraining_info.json: Training metadataApache 2.0
@misc{linkedin-content-generator-lora,
title={LinkedIn Content Generator LoRA Adapter},
author={Your Name},
year={2024},
publisher={HuggingFace},
url={https://huggingface.co/slavayosome/llama-3.2-3b-linkedin-lora}
}