RUAccent-encoders
Collection
An encoder models for TTS tasks • 2 items • Updated • 2
Run ruaccent/RUAccent-encoder on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/ruaccent/RUAccent-encoder. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/ruaccent/RUAccent-encoder on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use ruaccent/RUAccent-encoder with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("feature-extraction", model="ruaccent/RUAccent-encoder") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("ruaccent/RUAccent-encoder")
model = AutoModel.from_pretrained("ruaccent/RUAccent-encoder", device_map="auto")Эта модель представляет собой энкодер для TTS систем, который умеет разрешать омографию. Предназначен для интеграции в TTS системы, но лучше обратите внимание на энкодер который вогнали в стресс (как и автора RUAccent)
import torch
from transformers import AutoModel
import chartk
tokenizer = chartk.CharacterTokenizer.from_pretrained('ruaccent/RUAccent-encoder')
model = AutoModel.from_pretrained('ruaccent/RUAccent-stressed-encoder')
text = "На горе стоит замок"
inputs = tokenizer(text, return_tensors='pt', padding=True, truncation=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
last_hidden_state = outputs.last_hidden_state