Instructions to use KrorngAI/TrorYongASR-tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KrorngAI/TrorYongASR-tiny with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="KrorngAI/TrorYongASR-tiny", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("KrorngAI/TrorYongASR-tiny", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update tokenization_troryongasr.py
Browse files
tokenization_troryongasr.py
CHANGED
|
@@ -88,7 +88,7 @@ class TrorYongASRTokenizer(LlamaTokenizer):
|
|
| 88 |
|
| 89 |
def __call__(self, text: Optional[str] = None) -> List[int]:
|
| 90 |
encoding = self.encode(text, add_special_tokens=False)
|
| 91 |
-
return [*self.sot_sequence] + encoding
|
| 92 |
|
| 93 |
@cached_property
|
| 94 |
def eot(self) -> int:
|
|
|
|
| 88 |
|
| 89 |
def __call__(self, text: Optional[str] = None) -> List[int]:
|
| 90 |
encoding = self.encode(text, add_special_tokens=False)
|
| 91 |
+
return [*self.sot_sequence] + encoding + [self.eot]
|
| 92 |
|
| 93 |
@cached_property
|
| 94 |
def eot(self) -> int:
|