Downloads · 30 days
10
43% of all-time downloads
maytemuma/llamax3-8b-lora-zeroshot
llamax3-8b-lora-zeroshot is a text generation model from maytemuma. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
LoRA fine-tuned adapter for LLaMAX3-8B trained on syllogistic reasoning with zero-shot format during training and few-shot prompting at inference time.
Downloads · 30 days
10
43% of all-time downloads
All-time downloads
23
Public
Repo size
688 MB
Likes
0
Public
Click a slice to open those files.
.safetensors671 MB · 97%
From the Hugging Face model README
LoRA fine-tuned adapter for LLaMAX3-8B trained on syllogistic reasoning with zero-shot format during training and few-shot prompting at inference time.
This adapter is fine-tuned on top of the LLaMAX3-8B base model for SemEval 2026 Task 11: Logical Reasoning with Content Effect. The model was trained using a concise zero-shot prompt format and yields its best results when used with a 2-shot prompt at inference.
{ "r": 64, "lora_alpha": 128, "target_modules": [ "q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj" ], "lora_dropout": 0.05, "bias": "none", "task_type": "CAUSAL_LM" }
Trainable parameters: 167M of 8.1B total (~2.06%)
| Metric | Value |
|---|---|
| Accuracy | 87.5% |
| Content Effect (total) | 0.058 |
| Ranking Score | 15.03 |
| Intra-Plausibility CE | 0.076 |
| Cross-Plausibility CE | 0.040 |
| Model | Accuracy | Content Effect | Ranking Score |
|---|---|---|---|
| LLaMAX3-8B (few-shot only, no fine-tune) | 60.8% | 0.214 | 2.84 |
| This adapter (zero-shot trained + few-shot inference) | 87.5% | 0.058 | 15.03 |
pip install transformers peft torch
import torch from transformers import AutoModelForCausalLM, AutoTokenizer from peft import PeftModel
Load base model and tokenizer base_id = "LLaMAX/LLaMAX3-8B" base_model = AutoModelForCausalLM.from_pretrained( base_id, torch_dtype=torch.bfloat16, device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained(base_id) if tokenizer.pad_token is None: tokenizer.pad_token = tokenizer.eos_token
Load LoRA adapter model = PeftModel.from_pretrained( base_model, "maytemuma/llamax3-8b-lora-zeroshot" ) model.eval()
def classify_syllogism(syllogism: str, model, tokenizer) -> bool: """ Returns True for 'valid', False for 'invalid'. """ prompt = f"""Task: Determine if logical arguments are valid or invalid.
Example 1: Syllogism: All dogs are animals. All animals are living things. Therefore, all dogs are living things. Answer: valid
Example 2: Syllogism: No cats are dogs. Some animals are dogs. Therefore, some animals are cats. Answer: invalid
Example 3: Syllogism: {syllogism} Answer:"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device) with torch.no_grad(): outputs = model.generate( **inputs, max_new_tokens=5, temperature=0.7, do_sample=True, top_p=0.9, pad_token_id=tokenizer.eos_token_id ) response = tokenizer.decode( outputs[inputs["input_ids"].shape:],[11] skip_special_tokens=True ).strip().lower()
if response.startswith("valid") and "invalid" not in response[:10]: return True if "invalid" in response[:15]: return False return False
{ "learning_rate": 2e-4, "num_epochs": 10, "batch_size": 4, "gradient_accumulation_steps": 4, "warmup_ratio": 0.1, "weight_decay": 0.01, "max_seq_length": 512, "optimizer": "adamw_torch", "lr_scheduler": "cosine", "bf16": true, "early_stopping_patience": 3 }
Analyze the following syllogism and determine if it is logically valid or invalid.
Syllogism: {syllogism}
Is this syllogism logically valid? Answer with 'valid' or 'invalid'. Answer: {label}
@misc{llamax3-syllogistic-zeroshot-2025, author = {Maria Teresa Muñoz Martín}, title = {LLaMAX3-8B LoRA for Syllogistic Reasoning (Zero-shot Training)}, year = {2025}, publisher = {Hugging Face}, howpublished = {\url{https://huggingface.co/maytemuma/llamax3-8b-lora-zeroshot}}, note = {SemEval 2026 Task 11: Logical Reasoning with Content Effect} }
Apache-2.0. This adapter inherits the license terms compatible with its base model.