File tree Expand file tree Collapse file tree 3 files changed +4
-16
lines changed
Expand file tree Collapse file tree 3 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -68,24 +68,14 @@ jobs:
6868
6969 - name : Download model
7070 run : |
71- MODEL_SIZE=""
72- MODEL_SIZE_DESC=""
73-
7471 if [ "${{ github.event.inputs.model_size }}" == "small" ]; then
75- MODEL_SIZE="418M"
76- MODEL_SIZE_DESC="418M parameters, ~1GB disk space"
72+ make download-model-small
7773 elif [ "${{ github.event.inputs.model_size }}" == "medium" ]; then
78- MODEL_SIZE="1.2B"
79- MODEL_SIZE_DESC="1.2B parameters, ~2.5GB disk space"
74+ make download-model-medium
8075 elif [ "${{ github.event.inputs.model_size }}" == "large" ]; then
81- MODEL_SIZE="12B"
82- MODEL_SIZE_DESC="12B parameters, ~24GB disk space"
76+ make download-model-large
8377 fi
8478
85- echo "Downloading ${{ github.event.inputs.model_size }} model ($MODEL_SIZE_DESC)..."
86- mkdir -p models
87- python -m babeltron.scripts.download_models --size $MODEL_SIZE --output-dir ./models
88-
8979 - name : Create Dockerfile with embedded model
9080 run : |
9181 cat > Dockerfile.with-model << EOF
Original file line number Diff line number Diff line change @@ -33,15 +33,13 @@ def parse_args():
3333def download_model (
3434 model_size : str = DEFAULT_MODEL_SIZE ,
3535 output_dir : Optional [Union [str , Path ]] = None ,
36- show_progress : bool = True ,
3736) -> str :
3837 """
3938 Download M2M-100 model and tokenizer.
4039
4140 Args:
4241 model_size (str): Size of the model to download (418M, 1.2B, or 12B)
4342 output_dir (str or Path, optional): Directory to save the model to
44- show_progress (bool): Whether to show a progress bar
4543
4644 Returns:
4745 str: Path to the downloaded model directory
Original file line number Diff line number Diff line change 11[project ]
22name = " babeltron"
3- version = " 0.3.4 "
3+ version = " 0.3.5 "
44dynamic = [" version" ]
55description = " A Python-based REST API that leverages single multilingual models like mBERT to provide efficient text translation services"
66authors = [
You can’t perform that action at this time.
0 commit comments