Instructions to use oldradio2511/llama3.1-8b-customer-support-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use oldradio2511/llama3.1-8b-customer-support-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit") model = PeftModel.from_pretrained(base_model, "oldradio2511/llama3.1-8b-customer-support-lora") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use oldradio2511/llama3.1-8b-customer-support-lora with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for oldradio2511/llama3.1-8b-customer-support-lora to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for oldradio2511/llama3.1-8b-customer-support-lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for oldradio2511/llama3.1-8b-customer-support-lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="oldradio2511/llama3.1-8b-customer-support-lora", max_seq_length=2048, )
Llama 3.1 8B — Customer Support (LoRA Adapter)
Built with Llama
LoRA adapter (ไม่ใช่โมเดลเต็ม) fine-tune จาก unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit
ด้วย Unsloth บน dataset บทสนทนา customer support จาก Twitter (4 แบรนด์: AmazonHelp, AppleSupport, sprintcare, VerizonSupport)
adapter นี้ต้องใช้คู่กับ base model เสมอ — โหลดผ่าน transformers (ที่รองรับ PEFT auto-loading) หรือผ่าน peft โดยตรง
รูปแบบอื่นของโมเดลนี้:
- โมเดลเต็มแบบ merge แล้ว:
oldradio2511/llama3.1-8b-customer-support-merged - GGUF (สำหรับ llama.cpp / Ollama / LM Studio):
oldradio2511/llama3.1-8b-customer-support-gguf
วิธีใช้งาน
from transformers import pipeline
pipe = pipeline("text-generation", model="oldradio2511/llama3.1-8b-customer-support-lora")
messages = [
{"role": "system", "content": "You are a customer support assistant for AmazonHelp."},
{"role": "user", "content": "My package hasn't arrived yet and it's been 2 weeks, what should I do?"},
]
print(pipe(messages, max_new_tokens=256)[0]["generated_text"][-1]["content"])
หรือโหลดผ่าน PEFT โดยตรง:
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model_id = "unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit"
adapter_id = "oldradio2511/llama3.1-8b-customer-support-lora"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
base_model = AutoModelForCausalLM.from_pretrained(base_model_id, dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(base_model, adapter_id)
ข้อจำกัด
- โมเดลอาจ "แต่ง" ลิงก์หรือรายละเอียดที่ไม่มีอยู่จริง (hallucination) — ควรมี guardrail กรองก่อนใช้งานจริงกับลูกค้า
- เทรนด้วยข้อมูลผสม 4 แบรนด์ ผ่าน system prompt ระบุชื่อแบรนด์ — คุณภาพการแยกโทนของแต่ละแบรนด์ขึ้นกับความชัดเจนของ system prompt ที่ใช้ตอน inference
License
Adapter นี้ fine-tune ต่อจาก Meta Llama 3.1 จึงอยู่ภายใต้ Llama 3.1 Community License การใช้งาน/แจกจ่ายต่อต้องปฏิบัติตามเงื่อนไขของสัญญานี้ รวมถึง:
- แสดงข้อความ "Built with Llama" (แสดงไว้ด้านบนของ README นี้แล้ว)
- แนบไฟล์
NOTICEและLICENSEมาพร้อม repo นี้ - ปฏิบัติตาม Acceptable Use Policy ของ Meta
สัญญาฉบับเต็ม: https://llama.com/llama3_1/license/
- Downloads last month
- 57
Model tree for oldradio2511/llama3.1-8b-customer-support-lora
Base model
meta-llama/Llama-3.1-8B Finetuned
meta-llama/Llama-3.1-8B-Instruct