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.

RoBERTa Question-Type Classifier 2.0

This repository contains a fine-tuned RoBERTa model for classifying interviewer utterances into six question-type categories.

Version 2.0 predicts six categories:

Code Question type
0 Non-question
1 Option-posing question (yes-no and forced-choice)
2 Wh-question (directive)
3 Invitation
4 Tag question
5 Do you know/remember question

Access

This model uses gated access. Before downloading the model files, sign in to Hugging Face and accept the access conditions for this repository.

Access requests are automatically approved.

Getting the Model

After receiving access, you need to download the model files and notebook to your computer.

Option 1: Download from Hugging Face

Open the Files and versions tab and use the download button beside each file to download the repository files.

Keep the downloaded files together in one folder.

The folder should contain:

  • roberta_question_type_predictions_public.ipynb
  • config.json
  • model.safetensors
  • vocab.json
  • merges.txt
  • special_tokens_map.json
  • tokenizer_config.json

Then open the folder in VS Code or another Jupyter-compatible environment and open:

roberta_question_type_predictions_public.ipynb

Option 2: Download with the Hugging Face CLI

If you have the Hugging Face CLI installed and are signed in, you can download the complete repository with:

hf download USCchildinterviewinglab/roberta-question-type-classifier-2.0 --local-dir roberta-question-type-classifier-2.0

Option 3: Clone with Git

If you are familiar with Git, you can instead clone the repository:

git clone https://huggingface.co/USCchildinterviewinglab/roberta-question-type-classifier-2.0

Cloning is optional. You do not need to use Git in order to run the classifier.

Requirements

  • Python 3
  • A Jupyter-compatible environment, such as VS Code with the Python and Jupyter extensions
  • A Hugging Face account with access to this model in order to download the repository

The notebook installs the required Python packages for you.

Input Format

Your input must be a CSV file containing a column named exactly:

Question

Other columns are allowed and will be preserved in the output.

Example:

Question
Tell me everything that happened.
Did you see him?
Where did you go?

Running the Notebook

  1. Download or clone this repository.

  2. Open the repository folder in VS Code or another Jupyter-compatible environment.

  3. Open roberta_question_type_predictions_public.ipynb.

  4. If prompted to select a kernel:

    • Click Select Kernel.
    • Choose Python Environments....
    • Select a Python 3 environment.

    If you are using VS Code, make sure the Python and Jupyter extensions are installed.

  5. Place a copy of your CSV file in the same repository folder as the notebook.

  6. Make sure the CSV contains a column named exactly Question.

  7. If your file is not named input.csv, change input_file in Section 2 of the notebook to match your filename.

  8. Run the notebook cells from top to bottom.

The notebook does not overwrite the original file.

By default, predictions are written to:

input_with_question_type_predictions.csv

Two columns are added:

  • question_type_code: numeric prediction from 0–5
  • question_type_label: corresponding question-type label

Optional: Load the Model Directly with Transformers

Developers can also load the model directly from Hugging Face using the Transformers library instead of using the included notebook.

Because this model uses gated access, the Python environment must be authenticated with a Hugging Face account that has access to the repository.

from transformers import AutoTokenizer, AutoModelForSequenceClassification

model_id = "USCchildinterviewinglab/roberta-question-type-classifier-2.0"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)

This option is intended for users who want to integrate the classifier into their own Python code or workflow.

Citation

Citation information will be added upon publication.

Downloads last month
-
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for USCchildinterviewinglab/roberta-question-type-classifier-2.0

Finetuned
(2422)
this model