OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Bert Sklearn

Bert Sklearn is a Python library that wraps BERT fine-tuning in scikit-learn-style classifier, regressor and token-classifier workflows. Based on a PyTorch BERT port, it supports text and text-pair prediction as well as token-sequence labeling, and includes SciBERT and BioBERT pretrained models.

Independent OpenViST project profile, based on linked sources.

Bert Sklearn — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you want a scikit-learn-style workflow for fine-tuning BERT on labeled text, text-pair or token-sequence data, including scientific and biomedical use cases.

Who it is for

  • Python developers building supervised text or text-pair classification and regression models.
  • NLP practitioners working on token-level tasks such as named-entity recognition, part-of-speech tagging or chunking.
  • Teams exploring scientific or biomedical text models using SciBERT or BioBERT.

Documented uses

  • Fine-tune BERT using labeled text, text pairs or token lists.
  • Generate predictions, probability predictions and test-set scores.
  • Save a fitted model and load it again.
  • Tune model parameters with scikit-learn GridSearchCV.
Before you choose

Requirements & limits

The repository declares an Apache-2.0 license. Installation instructions require Python 3.5 or later and PyTorch 0.4.1 or later.

  • The documented interface accepts lists, pandas dataframes or NumPy arrays for inputs and labels or targets.
  • Classifier, regressor and token-classifier workflows address different prediction tasks.
  • Model options include the BERT model, number of MLP layers, maximum sequence length, epochs, learning rate and gradient accumulation steps.
  • The README includes example notebooks for IMDb sentiment, English and Chinese NER, biomedical NER and syntactic chunking.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Bert Sklearn

Install the library from its GitHub repository.

Before you start

  • Python 3.5 or later
  • PyTorch 0.4.1 or later

Steps

  1. Clone the master branch of the bert-sklearn repository.

  2. Change into the bert-sklearn directory.

  3. Run the command below.

    Documented command
    pip install .

Expected outcome

The repository's installation instructions install the package into the Python environment.

Guide limitations

  • These steps cover installation only; they do not verify that installation or model training succeeds in a particular environment.
Source-based practical guide

Fine-tune and evaluate a text classifier

Use the documented classifier workflow to fit a model, predict labels and score it on test data.

Before you start

  • Bert Sklearn installed
  • Training examples and labels, and test examples and labels; inputs may be lists, pandas dataframes or NumPy arrays

Steps

  1. Import BertClassifier from bert_sklearn and create a classifier.

  2. Fit it with model.fit(X_train, y_train).

  3. Generate predictions with model.predict(X_test).

  4. Evaluate with model.score(X_test, y_test).

Expected outcome

The documented workflow produces test-set predictions and a model score.

Guide limitations

  • The instructions require labeled data but do not prescribe a dataset or guarantee a particular result.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
charles9n/bert-sklearn · Official homepage title · retained in its source language