Text Generation
Transformers
PyTorch
TensorBoard
English
French
t5
text2text-generation
translation
NLP
text-generation-inference
Instructions to use EstherT/en-fr_translator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EstherT/en-fr_translator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EstherT/en-fr_translator")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("EstherT/en-fr_translator") model = AutoModelForSeq2SeqLM.from_pretrained("EstherT/en-fr_translator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use EstherT/en-fr_translator with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EstherT/en-fr_translator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EstherT/en-fr_translator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EstherT/en-fr_translator
- SGLang
How to use EstherT/en-fr_translator with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "EstherT/en-fr_translator" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EstherT/en-fr_translator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "EstherT/en-fr_translator" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EstherT/en-fr_translator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use EstherT/en-fr_translator with Docker Model Runner:
docker model run hf.co/EstherT/en-fr_translator
|
Download README.md from EstherT/en-fr_translator: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/EstherT/en-fr_translator/resolve/main/README.md
- Command line
-
hf download hf://EstherT/en-fr_translator/README.md
-
curl -L -o README.md https://huggingface.co/EstherT/en-fr_translator/resolve/main/README.md
1.07 kB
metadata
language:
- en
- fr
tags:
- translation
- NLP
datasets:
- enimai/MuST-C-fr
metrics:
- sacrebleu
pipeline_tag: text2text-generation
Model Card for Model ID
This model provides the translation of short English sentences into French.
Model Details
Model Description
- Model type: Text2Text Generation
- Language(s) (NLP): English, French
- Finetuned from model: T5-Base
Training Details
Training Data
The data used for traing was a randomized 10000-instance sub-set obtained from the 'train' split of the 'enimai/MuST-C-fr dataset.
Evaluation
The evaluation was made using 'sacrebleu'
Testing Data
The data used for testing was the 2632-instance 'test' split of the 'enimai/MuST-C-fr dataset.