You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Arabic Text-Target Classifier (LoRA) — t2_s8_allam7b_lora_prompt

3-class Arabic text classifier over (text, target) pairs, formulated as a prompted sequence-classification head on top of a LoRA-adapted instruction-tuned LLM. Access to the model weights requires manual approval from the repository owner.

Base model

humain-ai/ALLaM-7B-Instruct-preview

Labels

  • LABEL_0
  • LABEL_1
  • LABEL_2

Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification
from peft import PeftModel
import torch

base_model_id = "humain-ai/ALLaM-7B-Instruct-preview"
adapter_id = "HassanB4/t2_s8_allam7b_lora_prompt"

tokenizer = AutoTokenizer.from_pretrained(adapter_id)
base_model = AutoModelForSequenceClassification.from_pretrained(base_model_id, num_labels=3)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()

text = "..."
target = "..."
prompt = f"{text} [SEP] {target}"
inputs = tokenizer(prompt, return_tensors="pt", truncation=True, max_length=512)

with torch.no_grad():
    logits = model(**inputs).logits

predicted_label = int(torch.argmax(logits, dim=-1)[0])
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for HassanB4/t2_s8_allam7b_lora_prompt

Adapter
(22)
this model

Collection including HassanB4/t2_s8_allam7b_lora_prompt