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_symphony.py to configuration_fastslm.py
Browse files
configuration_symphony.py → configuration_fastslm.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from transformers import PretrainedConfig, AutoConfig
|
| 2 |
|
| 3 |
-
class
|
| 4 |
-
model_type = "
|
| 5 |
def __init__(
|
| 6 |
self,
|
| 7 |
n_mels=128,
|
|
@@ -22,8 +22,8 @@ class SymphonySpeechEncoderConfig(PretrainedConfig):
|
|
| 22 |
self.stage_tokens = stage_tokens
|
| 23 |
self.compression_size = compression_size
|
| 24 |
|
| 25 |
-
class
|
| 26 |
-
model_type = "
|
| 27 |
def __init__(
|
| 28 |
self,
|
| 29 |
encoder_config=None,
|
|
@@ -49,9 +49,9 @@ class SymphonyConfig(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 FastSLMSpeechEncoderConfig(PretrainedConfig):
|
| 4 |
+
model_type = "fastslm_speech_encoder"
|
| 5 |
def __init__(
|
| 6 |
self,
|
| 7 |
n_mels=128,
|
|
|
|
| 22 |
self.stage_tokens = stage_tokens
|
| 23 |
self.compression_size = compression_size
|
| 24 |
|
| 25 |
+
class FastSLMConfig(PretrainedConfig):
|
| 26 |
+
model_type = "fastslm"
|
| 27 |
def __init__(
|
| 28 |
self,
|
| 29 |
encoder_config=None,
|
|
|
|
| 49 |
|
| 50 |
# Encoder config 처리
|
| 51 |
if encoder_config is None:
|
| 52 |
+
encoder_config = FastSLMSpeechEncoderConfig()
|
| 53 |
elif isinstance(encoder_config, dict):
|
| 54 |
+
encoder_config = FastSLMSpeechEncoderConfig(**encoder_config)
|
| 55 |
|
| 56 |
self.llm_config = llm_config
|
| 57 |
self.encoder_config = encoder_config
|