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
File size: 835 Bytes
49bde14 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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
|