cnmoro / bert-tiny-question-classifier

huggingface.co
Total runs: 288
24-hour runs: -39
7-day runs: -57
30-day runs: 104
Model's Last Updated: April 12 2025
text-classification

Introduction of bert-tiny-question-classifier

Model Details of bert-tiny-question-classifier

A finetuned version of prajjwal1/bert-tiny.

The goal is to classify questions into "Directed" or "Generic".

If a question is not directed, we would change the actions we perform on a RAG pipeline (if it is generic, semantic search wouldn't be useful directly; e.g. asking for a summary).

(Class 0 is Generic; Class 1 is Directed)

The accuracy on the training dataset is around 87.5%

from transformers import BertForSequenceClassification, BertTokenizerFast
import torch

# Load the model and tokenizer
model = BertForSequenceClassification.from_pretrained("cnmoro/bert-tiny-question-classifier")
tokenizer = BertTokenizerFast.from_pretrained("cnmoro/bert-tiny-question-classifier")

def is_question_generic(question):
    # Tokenize the sentence and convert to PyTorch tensors
    inputs = tokenizer(
        question.lower(),
        truncation=True,
        padding=True,
        return_tensors="pt",
        max_length=512
    )

    # Get the model's predictions
    with torch.no_grad():
        outputs = model(**inputs)

    # Extract the prediction
    predictions = outputs.logits
    predicted_class = torch.argmax(predictions).item()

    return int(predicted_class) == 0

Runs of cnmoro bert-tiny-question-classifier on huggingface.co

288
Total runs
-39
24-hour runs
-49
3-day runs
-57
7-day runs
104
30-day runs

More Information About bert-tiny-question-classifier huggingface.co Model

More bert-tiny-question-classifier license Visit here:

https://choosealicense.com/licenses/apache-2.0

bert-tiny-question-classifier huggingface.co

bert-tiny-question-classifier huggingface.co is an AI model on huggingface.co that provides bert-tiny-question-classifier's model effect (), which can be used instantly with this cnmoro bert-tiny-question-classifier model. huggingface.co supports a free trial of the bert-tiny-question-classifier model, and also provides paid use of the bert-tiny-question-classifier. Support call bert-tiny-question-classifier model through api, including Node.js, Python, http.

bert-tiny-question-classifier huggingface.co Url

https://huggingface.co/cnmoro/bert-tiny-question-classifier

cnmoro bert-tiny-question-classifier online free

bert-tiny-question-classifier huggingface.co is an online trial and call api platform, which integrates bert-tiny-question-classifier's modeling effects, including api services, and provides a free online trial of bert-tiny-question-classifier, you can try bert-tiny-question-classifier online for free by clicking the link below.

cnmoro bert-tiny-question-classifier online free url in huggingface.co:

https://huggingface.co/cnmoro/bert-tiny-question-classifier

bert-tiny-question-classifier install

bert-tiny-question-classifier is an open source model from GitHub that offers a free installation service, and any user can find bert-tiny-question-classifier on GitHub to install. At the same time, huggingface.co provides the effect of bert-tiny-question-classifier install, users can directly use bert-tiny-question-classifier installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

bert-tiny-question-classifier install url in huggingface.co:

https://huggingface.co/cnmoro/bert-tiny-question-classifier

Url of bert-tiny-question-classifier

bert-tiny-question-classifier huggingface.co Url

Provider of bert-tiny-question-classifier huggingface.co

cnmoro
ORGANIZATIONS

Other API from cnmoro

huggingface.co

Total runs: 32
Run Growth: 32
Growth Rate: 100.00%
Updated:August 05 2026
huggingface.co

Total runs: 27
Run Growth: 11
Growth Rate: 36.67%
Updated:April 09 2026
huggingface.co

Total runs: 5
Run Growth: 4
Growth Rate: 80.00%
Updated:January 14 2025