Downloads · 30 days
4
100% of all-time downloads
MB55/teuken7b-advance-classifier
teuken7b-advance-classifier is a machine learning model from MB55. 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 mit.
This model is a fine-tuned version of openGPT-X/Teuken-7B-instruct-research-v0.4 optimized using QLoRA for efficient binary classification of German dialogue utterances into:
Downloads · 30 days
4
100% of all-time downloads
All-time downloads
4
Public
Repo size
30.5 MB
Likes
0
Public
Click a slice to open those files.
.safetensors25.7 MB · 84%
From the Hugging Face model README
This model is a fine-tuned version of openGPT-X/Teuken-7B-instruct-research-v0.4 optimized using QLoRA for efficient binary classification of German dialogue utterances into:
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}")