Text Generation
Transformers
English
Khasi
marian
text2text-generation
tokenizer
sentencepiece
low-resource
nlp
machine-translation
khasi
Instructions to use Bapynshngain/enkha-hybrid-tokenizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Bapynshngain/enkha-hybrid-tokenizer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Bapynshngain/enkha-hybrid-tokenizer")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Bapynshngain/enkha-hybrid-tokenizer") model = AutoModelForMultimodalLM.from_pretrained("Bapynshngain/enkha-hybrid-tokenizer") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Bapynshngain/enkha-hybrid-tokenizer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Bapynshngain/enkha-hybrid-tokenizer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Bapynshngain/enkha-hybrid-tokenizer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Bapynshngain/enkha-hybrid-tokenizer
- SGLang
How to use Bapynshngain/enkha-hybrid-tokenizer with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Bapynshngain/enkha-hybrid-tokenizer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Bapynshngain/enkha-hybrid-tokenizer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Bapynshngain/enkha-hybrid-tokenizer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Bapynshngain/enkha-hybrid-tokenizer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Bapynshngain/enkha-hybrid-tokenizer with Docker Model Runner:
docker model run hf.co/Bapynshngain/enkha-hybrid-tokenizer
English–Khasi Hybrid Tokenizer (Unigram, 12k)
This repository provides a SentencePiece-based hybrid tokenizer for English–Khasi NLP tasks.
It is Gated on automatic approval so if you have an account, go ahead and create something with this!
Overview
- Languages: English, Khasi
- Model: SentencePiece Unigram
- Vocabulary size: 12,000
- Training data:
- Parallel EN–KHA corpus (~70k pairs)
- Khasi monolingual corpus (~42k sentences)
- Curriculum-boosted morphology roots
Motivation
Khasi is a low-resource language with limited NLP tooling. This tokenizer is designed to preserve Khasi morphology while remaining compatible with English.
Usage
from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("Bapynshngain/enkha-hybrid-tokenizer")
tokens = tok.tokenize("Nga kwah ban sngewthuh ia kane")
print(tokens)
- Downloads last month
- -
Datasets used to train Bapynshngain/enkha-hybrid-tokenizer
Viewer • Updated • 40k • 9 • 1
Bapynshngain/Bapyn-En-Kha
Viewer • Updated • 70.8k • 6