LLaMA3-8B-Instruct SFT on Alpaca Dataset
This model is fine-tuned from LLaMA3.1-8B-Instruct using Supervised Fine-Tuning (SFT) on the "FreedomIntelligence/alpaca-gpt4-chinese" dataset.
The fine-tuning process aims to enhance the model's instruction-following and conversational alignment capabilities.
🧠 Training Information
- Base Model: LLaMA3-8B-Instruct
- Dataset: Stanford Alpaca
- Training Type: Supervised Fine-Tuning (SFT)
- Framework: PyTorch + Hugging Face Transformers
💻 Usage Example
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = 'wesjos/SFT-llama3-8b-alpaca'
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="bfloat16")
alpaca_prompt = """Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
{}
### Response:
"""
inputs = tokenizer(
[
alpaca_prompt.format(
"请你介绍一下自己",
)
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=1024, use_cache=True,temperature=0.9,do_sample=True,top_p=0.95,top_k=20)
print(tokenizer.batch_decode(outputs)[0])
- Downloads last month
- 22
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
Model tree for wesjos/SFT-llama3-8b-alpaca
Base model
meta-llama/Llama-3.1-8B
Finetuned
meta-llama/Llama-3.1-8B-Instruct