Translation
Transformers
Safetensors
English
Hindi
lstm_seq2seq_en_hi
text2text-generation
se2seq2014
custom_code
Instructions to use kd13/nano-translate-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kd13/nano-translate-v1 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="kd13/nano-translate-v1", trust_remote_code=True)# Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("kd13/nano-translate-v1", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update configuration_lstm_seq2seq_en_hi.py
Browse files
configuration_lstm_seq2seq_en_hi.py
CHANGED
|
@@ -15,6 +15,7 @@ class Seq2SeqConfig(PretrainedConfig):
|
|
| 15 |
eos_token_id=3,
|
| 16 |
decoder_start_token_id=2,
|
| 17 |
is_encoder_decoder=True,
|
|
|
|
| 18 |
**kwargs
|
| 19 |
):
|
| 20 |
super().__init__(
|
|
@@ -23,6 +24,7 @@ class Seq2SeqConfig(PretrainedConfig):
|
|
| 23 |
eos_token_id=eos_token_id,
|
| 24 |
decoder_start_token_id=decoder_start_token_id,
|
| 25 |
is_encoder_decoder=is_encoder_decoder,
|
|
|
|
| 26 |
**kwargs
|
| 27 |
)
|
| 28 |
self.vocab_size = vocab_size
|
|
|
|
| 15 |
eos_token_id=3,
|
| 16 |
decoder_start_token_id=2,
|
| 17 |
is_encoder_decoder=True,
|
| 18 |
+
architectures=None,
|
| 19 |
**kwargs
|
| 20 |
):
|
| 21 |
super().__init__(
|
|
|
|
| 24 |
eos_token_id=eos_token_id,
|
| 25 |
decoder_start_token_id=decoder_start_token_id,
|
| 26 |
is_encoder_decoder=is_encoder_decoder,
|
| 27 |
+
architectures=architectures or ["Seq2SeqHFModel"],
|
| 28 |
**kwargs
|
| 29 |
)
|
| 30 |
self.vocab_size = vocab_size
|