Skip to main content

A library for building and testing NLP models with PyTorch and Transformers.

Project description

QuerySquirrel Logo

QuerySquirrel

QuerySquirrel is a Python library for building, training, and testing NLP models using PyTorch and the Hugging Face Transformers library. It simplifies model development by providing high-level utilities for data handling, model training, evaluation, and fine-tuning.

Table of Contents


Features

  • Easy Dataset Handling: Load and preprocess text data efficiently.
  • Model Training and Fine-tuning: Train Transformer-based models with minimal code.
  • Evaluation Metrics: Built-in utilities for assessing model performance.
  • Custom Model Support: Extend existing models or integrate your own architectures.
  • Integration with PyTorch and Transformers: Seamless use of popular NLP frameworks.

Installation

To install QuerySquirrel on your local machine, follow these steps:

Install from PyPI

Run the following command to install QuerySquirrel via pip:

pip install querysquirrel

Dependencies

QuerySquirrel requires Python 3.7+ and the following libraries:

  • PyTorch
  • Transformers (Hugging Face)
  • Datasets
  • NumPy
  • scikit-learn
  • torch
  • torch.nn
  • torch.nn.functional
  • torch.optim
  • tqdm
  • torch.utils.data
  • sklearn.metrics
  • sklearn.preprocessing
  • transformers
  • sentence-transformers
  • math
  • os
  • collections
  • pandas
  • pyarrow
  • dask.dataframe
  • numpy
  • Counter (from collections)
  • seaborn
  • matplotlib

Usage

Once installed, you can import QuerySquirrel in your Python projects like this:

from querysquirrel import myfunctions as qs

Quick Start

Here's an example of how to use QuerySquirrel to train a text classification model:

import querysquirrel
from querysquirrel import myfunctions as qs

# Load dataset
data = qs.load_dataset("imdb")

# Preprocess data
data = qs.tokenize(data, model_name="bert-base-uncased")

# Train model
model = qs.train(data, model_name="bert-base-uncased", epochs=3)

# Evaluate model
results = qs.evaluate(model, data["test"])
print("Evaluation Results:", results)

Contributing

We welcome contributions! To contribute:

  1. Fork the repository.
  2. Create a feature branch.
  3. Make your changes and write tests.
  4. Submit a pull request.

License

QuerySquirrel is released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

querysquirrel-0.1.10.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

querysquirrel-0.1.10-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file querysquirrel-0.1.10.tar.gz.

File metadata

  • Download URL: querysquirrel-0.1.10.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.6

File hashes

Hashes for querysquirrel-0.1.10.tar.gz
Algorithm Hash digest
SHA256 a68eae9e7d827d08c53c89ce43ece6d967cab0c741f8a77ff9b7703b59ffff85
MD5 cc638e0940a35c0858544c7ab40a8375
BLAKE2b-256 9fc9762c16f892c1d0fd9f7afd14af63c0d30110fc49b305e60c3b2e9c7e2a70

See more details on using hashes here.

File details

Details for the file querysquirrel-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: querysquirrel-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.6

File hashes

Hashes for querysquirrel-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 ebed5c8c594b2f037a5faaf1b937c8a0ab4bf7ecb64025f63acc2b13b546080e
MD5 3841aae0bd70649bdb6dd7912e33a3d0
BLAKE2b-256 e8402900f8ada5cc8864b482f68903d26f8e4b5e5c16e7a65cb66865129ea3b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page