Downloads · 30 days
0
hagsaeng/MachinLearningBootCamp_QAclassifier_Gemma-2B
MachinLearningBootCamp_QAclassifier_Gemma-2B is a text classification model from hagsaeng. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
This model is a fine-tuned version of google/gemma-2b-it designed to classify text into two categories: QUESTION or NOTQUESTION. It was fine-tuned on a custom dataset that combines the SQuAD dataset (containing questi…
Downloads · 30 days
0
Access
Public
Updated Oct 3, 2024
Repo size
140 MB
Likes
0
Public
Click a slice to open those files.
.safetensors59 MB · 73%
From the Hugging Face model README
This model is a fine-tuned version of google/gemma-2b-it designed to classify text into two categories: QUESTION or NOT_QUESTION. It was fine-tuned on a custom dataset that combines the SQuAD dataset (containing questions) and the GLUE SST-2 dataset (containing general non-question sentences).
google/gemma-2b-itBitsAndBytesConfigq_proj, k_proj, v_proj, o_projThe model was trained using a combination of two datasets:
Each dataset was preprocessed to contain a label:
P_remove = 0.3) was applied to remove some of the questions containing a question mark (?), to increase the model's robustness.N=100 for training and testing).You can use this model to classify whether a given text is a question or not. Here’s how you can use it:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("your_model_name")
model = AutoModelForSequenceClassification.from_pretrained("your_model_name")
inputs = tokenizer("What is the capital of France?", return_tensors="pt")
outputs = model(**inputs)
predictions = torch.argmax(outputs.logits, axis=1)
label = "QUESTION" if predictions == 1 else "NOT_QUESTION"
print(f"Predicted Label: {label}")
This model is intended for text classification tasks where distinguishing between questions and non-questions is needed. Potential use cases include:
This model follows the same license as google/gemma-2b-it. Please refer to the original license for any usage restrictions.