Skip to content

Add ONNX support for InternLM2 #245

Add ONNX support for InternLM2

Add ONNX support for InternLM2 #245

name: Exporters TFLite CLI / Python - Test
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened, labeled, unlabeled]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
TRANSFORMERS_IS_CI: true
jobs:
build:
if: ${{
(github.event_name == 'push') ||
(github.event_name == 'workflow_dispatch') ||
contains( github.event.pull_request.labels.*.name, 'tflite' )
}}
strategy:
fail-fast: false
matrix:
python-version: [3.9]
runs-on: [ubuntu-22.04]
quantization_schema:
[
"not quantization",
float16_quantization,
int8_dynamic_quantization,
int8_quantization_with_custom_dataset,
int8_quantization_with_default_dataset,
int8x16_quantization_with_default_dataset,
full_int8_quantization_with_default_dataset,
]
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --no-cache-dir torch==2.1.2 torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install .[tests,exporters-tf]
- name: Test with pytest
run: |
pytest tests/exporters/tflite/test_export_cli.py -k "${{ matrix.quantization_schema }}" -vvvv --durations=0 -n auto