Views
No views yet
humain-ai/ALLaM-7B-Instruct-preview| ID | Label | Meaning |
|---|---|---|
| 0 | Favor | Tweet supports the target |
| 1 | Against | Tweet opposes the target |
| 2 | None | Neutral, irrelevant, or unclear stance |
t1_s10_allam7b_lora_prompt recipe,
retrained on the combined train+dev data immediately before the official test submission (dev
Favg2 for the pre-refit checkpoint: 86.06). Trading the held-out check for more training data
is standard practice right before a competition test submission.1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2from peft import PeftModel
3import torch
4
5base_model_id = "humain-ai/ALLaM-7B-Instruct-preview"
6adapter_id = "HassanB4/t1_s11_allam7b_lora_prompt_final"
7
8id2label = {0: "Favor", 1: "Against", 2: "None"}
9
10tokenizer = AutoTokenizer.from_pretrained(adapter_id)
11base_model = AutoModelForSequenceClassification.from_pretrained(base_model_id, num_labels=3)
12model = PeftModel.from_pretrained(base_model, adapter_id)
13model.eval()
14
15text = "..."
16target = "..."
17prompt = f"{text} [SEP] {target}"
18inputs = tokenizer(prompt, return_tensors="pt", truncation=True, max_length=512)
19
20with torch.no_grad():
21 logits = model(**inputs).logits
22
23predicted_label = id2label[int(torch.argmax(logits, dim=-1)[0])]
24print(predicted_label)