TransformersSharp¶
A little wrapper for Hugging Face Transformers in C#. This is not a comprehensive 1:1 mapping of the whole HuggingFace transformers package, because the API is enormous.
If you need a specific feature, toggle or pipeline API clone this repo and make adjustments.
This project was created using CSnakes and will fetch Python, PyTorch, and Hugging Face Transformers automatically, so you don't need to install them manually.
Features¶
- Tokenizer API based on
PreTrainedTokenizerBase
- Tokenizer shim to the Microsoft.ML.Tokenizers base class
- Generic Pipeline Factory
- Text Generation Pipeline (
TextGenerationPipeline
) - Text Classification Pipeline (
TextClassificationPipeline
) - Image Classification Pipeline(
ImageClassificationPipeline
) - Object Detection Pipeline (
ObjectDetectionPipeline
) - Text to Audio Pipeline (
TextToAudioPipeline
) - Automatic Speech Recognition (
AutomaticSpeechRecognitionPipeline
) - Sentence Transformers (Embeddings)