EryriLabs/uk_legislation_alpaca_style_cleaned
Viewer • Updated • 8.87k • 12
This model is a fine-tuned version of the Llama 3.2 UK Legislation 3B base. It was instruction-tuned for Q and A on UK legislation. It was trained as part of a blog series, see the article here
This model is designed to serve as Q and A for UK legislation and for further development for tasks such as:
This model is not suitable for:
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("EryriLabs/llama-3.2-uk-legislation-instruct-3b", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("EryriLabs/llama-3.2-uk-legislation-instruct-3b")
# Sample question
input_text = "What are the main principles of UK legislation?"
# Tokenize and generate response
inputs = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(inputs["input_ids"], max_length=50)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
If you use this model, please cite:
@misc{llama3.2-uk-legislation-instruct-3b,
author = {GPT-LABS.AI},
title = {Llama 3.2 UK Legislation Instruct 3B},
year = {2024},
publisher = {Hugging Face},
url = {https://huggingface.co/EryriLabs/llama-3.2-uk-legislation-instruct-3b}
}
For questions or feedback, please visit gpt-labs.ai
Base model
meta-llama/Llama-3.2-3B