Downloads · 30 days
11
5% of all-time downloads
TronCodes/augustulus-latin-sentiment-lora
augustulus-latin-sentiment-lora is a machine learning model from TronCodes. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as llama3.1.
Developed by Team Trojan Parse University of Florida Senior Design Project
Downloads · 30 days
11
5% of all-time downloads
All-time downloads
235
Public
Repo size
9.9 GB
Likes
0
Public
Click a slice to open those files.
.gguf8.5 GB · 86%
From the Hugging Face model README
Developed by Team Trojan Parse University of Florida Senior Design Project
A LoRA (Low-Rank Adaptation) adapter fine-tuned on Llama-3.1-8B-Instruct for fine-grained sentiment classification of Ancient Latin texts across seven emotional intensity levels.
augustulus-latin-sentiment-loraOur model classifies Ancient Latin texts into six emotional intensity levels:
EXTREMELY POSITIVE (+3): exsultatio, jubilum, beatitudo, summa felicitas
VERY POSITIVE (+2): gaudium, laetitia, amor, gloria, victoria, laudare
MODERATELY POSITIVE (+1): felix, laetus, bonus, pulcher, spes
MODERATELY NEGATIVE (-1): malus, tristis, anxius, timor
VERY NEGATIVE (-2): dolor magnus, timor vehemens, ira, furor
EXTREMELY NEGATIVE (-3): desperatio, exitium, cruciatus, malum
| Configuration | Accuracy | Notes |
|---|---|---|
| Base Llama 3.1 (zero-shot) | 43.8% | Unreliable, biased toward extremes |
| LoRA Adapter (raw predictions) | 37.5% | Systematic but conservative |
| LoRA + Linguistic Rules | 75.0% | Production-ready |
Our training methodology combined multiple data sources and validation strategies:
Phase 1: Initial Generation
Phase 2: Consensus Filtering
Phase 3: Corpus Mining
Phase 4: Final Training & Iteration
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
# Load base model and adapter
base_model = "meta-llama/Llama-3.1-8B-Instruct"
model = AutoModelForCausalLM.from_pretrained(
base_model,
device_map="auto",
torch_dtype=torch.float16,
trust_remote_code=True
)
# Load Team Trojan Parse's adapter
# Replace YOUR_USERNAME with your Hugging Face username
model = PeftModel.from_pretrained(model, "YOUR_USERNAME/augustulus-latin-sentiment-lora")
tokenizer = AutoTokenizer.from_pretrained(base_model)
# Classify sentiment
def classify_latin_sentiment(text):
prompt = f'''Classify the sentiment of this Latin text as: VERY NEGATIVE, MODERATELY NEGATIVE, NEUTRAL, MODERATELY POSITIVE, VERY POSITIVE, or EXTREMELY POSITIVE.
Latin text: {text}
Sentiment:'''
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=20,
temperature=0.1,
do_sample=False
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
return response.split("Sentiment:")[-1].strip()
# Example: Extreme positive (triumph)
text = "Victoria splendidissima! Dux gloriam aeternam meruit!"
print(classify_latin_sentiment(text))
# Output: EXTREMELY POSITIVE
# Example: Extreme negative (despair)
text = "Bellum crudele et longum populum afflixerat."
print(classify_latin_sentiment(text))
# Output: VERY NEGATIVE
The LoRA adapter has been merged with the base model and quantized to Q8_0 (8-bit) precision for efficient deployment on CPU/GPU via tools like llama.cpp and Ollama.
augustulus-latin-sentiment-8b-q8_0.ggufIMPORTANT: This model (including the GGUF file) is a derivative of Meta’s Llama 3.1 model and is governed by the Meta Llama 3.1 Community License.
This workflow uses a custom Modelfile to set the strict sentiment task and gives the model a simple local name.
Save the following content as a file named Modelfile:
# Modelfile for the Augustulus Latin Sentiment Model
FROM hf.co/TronCodes/augustulus-latin-sentiment-lora/augustulus-latin-sentiment-8b-q8_0.gguf
SYSTEM """
You are Augustulus, an expert in Classical Latin sentiment analysis. Your task is to respond ONLY with one of the following exact labels: EXTREMELY POSITIVE, VERY POSITIVE, MODERATELY POSITIVE, NEUTRAL, MODERATELY NEGATIVE, VERY NEGATIVE, or EXTREMELY NEGATIVE. Do not provide any conversational text or explanation.
"""
TEMPLATE """
{{ if .System }}<|start_header_id|>system<|end_header_id|>{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>
"""
PARAMETER temperature 0.1
PARAMETER num_predict 20
PARAMETER stop "<|eot_id|>"
ollama create augustulus-latin -f Modelfile
ollama run augustulus-latin
We gratefully acknowledge:
@misc{trojan_parse_latin_sentiment_2025,
author = {{Team Trojan Parse}},
title = {Augustulus Latin Sentiment Analysis LoRA},
year = {2025},
publisher = {University of Florida},
journal = {HuggingFace Model Hub},
howpublished = {\\url{[https://huggingface.co/TronCodes/augustulus-latin-sentiment-lora](https://huggingface.co/TronCodes/augustulus-latin-sentiment-lora)}}
}