Audio-Text-to-Text
Transformers
Safetensors
English
Korean
fastslm
feature-extraction
audio
text-generation
custom_code
Eval Results
Instructions to use okestro-ai-lab/FastSLM-ASR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use okestro-ai-lab/FastSLM-ASR with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("okestro-ai-lab/FastSLM-ASR", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Rename configuration_fastslm.py to configuration_symphony_ASR.py
Browse files
configuration_fastslm.py → configuration_symphony_ASR.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
from transformers import PretrainedConfig, AutoConfig
|
| 2 |
|
| 3 |
-
class
|
| 4 |
model_type = "fastslm_speech_encoder"
|
| 5 |
def __init__(
|
| 6 |
self,
|
|
@@ -22,7 +22,7 @@ class FastSLMSpeechEncoderConfig(PretrainedConfig):
|
|
| 22 |
self.stage_tokens = stage_tokens
|
| 23 |
self.compression_size = compression_size
|
| 24 |
|
| 25 |
-
class
|
| 26 |
model_type = "fastslm"
|
| 27 |
def __init__(
|
| 28 |
self,
|
|
@@ -49,9 +49,9 @@ class FastSLMConfig(PretrainedConfig):
|
|
| 49 |
|
| 50 |
# Encoder config 처리
|
| 51 |
if encoder_config is None:
|
| 52 |
-
encoder_config =
|
| 53 |
elif isinstance(encoder_config, dict):
|
| 54 |
-
encoder_config =
|
| 55 |
|
| 56 |
self.llm_config = llm_config
|
| 57 |
self.encoder_config = encoder_config
|
|
|
|
| 1 |
from transformers import PretrainedConfig, AutoConfig
|
| 2 |
|
| 3 |
+
class SYMPHONYSpeechEncoderConfig(PretrainedConfig):
|
| 4 |
model_type = "fastslm_speech_encoder"
|
| 5 |
def __init__(
|
| 6 |
self,
|
|
|
|
| 22 |
self.stage_tokens = stage_tokens
|
| 23 |
self.compression_size = compression_size
|
| 24 |
|
| 25 |
+
class SYMPHONYConfig(PretrainedConfig):
|
| 26 |
model_type = "fastslm"
|
| 27 |
def __init__(
|
| 28 |
self,
|
|
|
|
| 49 |
|
| 50 |
# Encoder config 처리
|
| 51 |
if encoder_config is None:
|
| 52 |
+
encoder_config = SYMPHONYSpeechEncoderConfig()
|
| 53 |
elif isinstance(encoder_config, dict):
|
| 54 |
+
encoder_config = SYMPHONYSpeechEncoderConfig(**encoder_config)
|
| 55 |
|
| 56 |
self.llm_config = llm_config
|
| 57 |
self.encoder_config = encoder_config
|