This fine-tuned Llama 3.1 8B model was optimized for efficient text generation tasks.
By leveraging advanced optimization techniques from
Unsloth and
Hugging Face's TRL library,
training was completed 2x faster than conventional methods.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3# Load the model and tokenizer
4model_name = "kparkhade/Llama-3.1-8B"
5model = AutoModelForCausalLM.from_pretrained(model_name)
6tokenizer = AutoTokenizer.from_pretrained(model_name)
7
8# Generate text
9inputs = tokenizer("Your input prompt here", return_tensors="pt")
10outputs = model.generate(**inputs)
11print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Special thanks to the
Unsloth team for providing tools that make model fine-tuning faster and more efficient.