File size: 1,485 Bytes
3230644 d2eb741 3230644 d52438b 3230644 355b821 d52438b 355b821 d2eb741 d52438b d2eb741 d52438b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
---
base_model: openGPT-X/Teuken-7B-instruct-research-v0.4
license: mit
---
# Teuken7B QLoRA – Grounding Act Classification
This model is a fine-tuned version of [openGPT-X/Teuken-7B-instruct-research-v0.4](https://huggingface.co/openGPT-X/Teuken-7B-instruct-research-v0.4) optimized using QLoRA for efficient binary classification of German dialogue utterances into:
- **advance**: Contribution that moves the dialogue forward (e.g. confirmations, follow-ups, elaborations)
- **non_advance**: Other utterances (e.g. vague responses, misunderstandings, irrelevant comments)
---
## Use Cases
- Dialogue system analysis
- Teacher-student interaction classification
- Grounding in institutional advising or classroom discourse
---
## How to Use:
```python
from transformers import AutoModelForSequenceClassification, AutoTokenizer
import torch
tokenizer = AutoTokenizer.from_pretrained("openGPT-X/Teuken-7B-instruct-research-v0.4")
model = AutoModelForSequenceClassification.from_pretrained("MB55/teuken7b-advance-classifier")
model.eval()
def predict(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
if "token_type_ids" in inputs:
del inputs["token_type_ids"]
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
predicted_class = logits.argmax(dim=-1).item()
return predicted_class
text = "Ich bin da."
prediction = predict(text)
print(f"Predicted class: {prediction}")
|