Instructions to use IndexTeam/Index-Echo-S2ST-9B-FP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IndexTeam/Index-Echo-S2ST-9B-FP4 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("translation", model="IndexTeam/Index-Echo-S2ST-9B-FP4")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("IndexTeam/Index-Echo-S2ST-9B-FP4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download code/ja_ext/pyopenjtalk/utils.py from IndexTeam/Index-Echo-S2ST-9B-FP4: direct link, hf CLI and curl.
- Browser
- Download file 835 Bytes
-
https://huggingface.co/IndexTeam/Index-Echo-S2ST-9B-FP4/resolve/main/code/ja_ext/pyopenjtalk/utils.py
- Command line
-
hf download hf://IndexTeam/Index-Echo-S2ST-9B-FP4/code/ja_ext/pyopenjtalk/utils.py
-
curl -L -o utils.py https://huggingface.co/IndexTeam/Index-Echo-S2ST-9B-FP4/resolve/main/code/ja_ext/pyopenjtalk/utils.py
835 Bytes
| def merge_njd_marine_features(njd_features, marine_results): | |
| features = [] | |
| marine_accs = marine_results["accent_status"] | |
| marine_chain_flags = marine_results["accent_phrase_boundary"] | |
| assert ( | |
| len(njd_features) == len(marine_accs) == len(marine_chain_flags) | |
| ), "Invalid sequence sizes in njd_results, marine_results" | |
| for node_index, njd_feature in enumerate(njd_features): | |
| _feature = {} | |
| for feature_key in njd_feature.keys(): | |
| if feature_key == "acc": | |
| _feature["acc"] = int(marine_accs[node_index]) | |
| elif feature_key == "chain_flag": | |
| _feature[feature_key] = int(marine_chain_flags[node_index]) | |
| else: | |
| _feature[feature_key] = njd_feature[feature_key] | |
| features.append(_feature) | |
| return features | |