mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-08-26 15:46:08 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da42d422f8 |
@@ -1,15 +0,0 @@
|
||||
name: Run process replay tests
|
||||
description: Verify process replay compared to master
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Run process replay tests
|
||||
shell: bash
|
||||
run: |
|
||||
export PR_TITLE=$(jq -r .pull_request.title "$GITHUB_EVENT_PATH")
|
||||
export CURRENT_SHA=${{ github.event.pull_request && github.event.pull_request.head.sha || github.sha }}
|
||||
git fetch origin $CURRENT_SHA
|
||||
export COMMIT_MESSAGE=$(git show -s --format=%B "$CURRENT_SHA")
|
||||
export CURRENT_HEAD=$(git rev-parse HEAD)
|
||||
cp test/external/process_replay/process_replay.py ./process_replay.py && git fetch origin master && git -c advice.detachedHead=false checkout origin/master && IGNORE_OOB=1 PYTHONPATH=. python3 process_replay.py
|
||||
git checkout $CURRENT_HEAD # restore to branch
|
||||
@@ -1,253 +0,0 @@
|
||||
name: Setup Python & Install
|
||||
description: Sets up Python and installs project dependencies.
|
||||
inputs:
|
||||
python-version:
|
||||
description: 'Python version to use'
|
||||
required: false
|
||||
default: '3.12'
|
||||
key:
|
||||
description: 'Key for the python cache'
|
||||
required: false
|
||||
default: '' # if you don't set a key, it doesn't cache
|
||||
deps:
|
||||
description: 'Extra dependency groups (comma separated)'
|
||||
required: false
|
||||
default: ''
|
||||
pydeps:
|
||||
description: 'Extra Python dependency groups (space separated)'
|
||||
required: false
|
||||
default: ''
|
||||
opencl:
|
||||
description: "Install OpenCL?"
|
||||
required: false
|
||||
default: 'false'
|
||||
amd:
|
||||
description: "Install AMD?"
|
||||
required: false
|
||||
default: 'false'
|
||||
cuda:
|
||||
description: "Install CUDA?"
|
||||
required: false
|
||||
default: 'false'
|
||||
ocelot:
|
||||
description: "Install gpuocelot?"
|
||||
required: false
|
||||
default: 'false'
|
||||
webgpu:
|
||||
description: "Install webgpu?"
|
||||
required: false
|
||||
default: 'false'
|
||||
llvm:
|
||||
description: "Install LLVM?"
|
||||
required: false
|
||||
default: 'false'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set up Python ${{ inputs.python-version }}
|
||||
id: setup-python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ inputs.python-version }}
|
||||
|
||||
# **** Caching packages ****
|
||||
|
||||
- name: Cache Python packages
|
||||
id: restore-venv
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/.venv
|
||||
key: venv-${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-${{ inputs.deps }}-${{ inputs.pydeps }}-${{ hashFiles('**/setup.py') }}-${{ env.PYTHON_CACHE_VERSION }}
|
||||
|
||||
# **** Caching downloads ****
|
||||
|
||||
- name: Cache downloads (Linux)
|
||||
if: inputs.key != '' && runner.os == 'Linux'
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/tinygrad/downloads/
|
||||
key: downloads-cache-${{ inputs.key }}-${{ env.DOWNLOAD_CACHE_VERSION }}
|
||||
- name: Cache downloads (macOS)
|
||||
if: inputs.key != '' && runner.os == 'macOS'
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/Library/Caches/tinygrad/downloads/
|
||||
key: osx-downloads-cache-${{ inputs.key }}-${{ env.DOWNLOAD_CACHE_VERSION }}
|
||||
|
||||
# **** Python deps ****
|
||||
|
||||
- name: Install dependencies in venv (with extra)
|
||||
if: inputs.deps != '' && steps.restore-venv.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
python -m venv .venv
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
source .venv/Scripts/activate
|
||||
else
|
||||
. .venv/bin/activate
|
||||
fi
|
||||
python -m pip install -e ".[${{ inputs.deps }}]" ${{ inputs.pydeps }} --extra-index-url https://download.pytorch.org/whl/cpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/
|
||||
- name: Install dependencies in venv (without extra)
|
||||
if: inputs.deps == '' && steps.restore-venv.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
python -m venv .venv
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
source .venv/Scripts/activate
|
||||
else
|
||||
. .venv/bin/activate
|
||||
fi
|
||||
python -m pip install -e . ${{ inputs.pydeps }}
|
||||
- name: Set up venv environment
|
||||
shell: bash
|
||||
run: |
|
||||
echo "VIRTUAL_ENV=${{ github.workspace }}/.venv" >> "$GITHUB_ENV"
|
||||
echo "OMP_NUM_THREADS=1" >> "$GITHUB_ENV"
|
||||
# no buffers should be over 300MB in CI
|
||||
echo "MAX_BUFFER_SIZE=300000000" >> "$GITHUB_ENV"
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
echo "${{ github.workspace }}/.venv/Scripts" >> "$GITHUB_PATH"
|
||||
else
|
||||
echo "${{ github.workspace }}/.venv/bin" >> "$GITHUB_PATH"
|
||||
fi
|
||||
|
||||
# ******************* apt *******************
|
||||
|
||||
- name: Add OpenCL Repo
|
||||
if: inputs.opencl == 'true' && runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: echo "deb [ allow-insecure=yes ] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
||||
|
||||
- name: Add AMD Repo (Linux)
|
||||
if: inputs.amd == 'true' && runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
|
||||
sudo tee /etc/apt/sources.list.d/rocm.list <<EOF
|
||||
deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.2 $(lsb_release -cs) main
|
||||
EOF
|
||||
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
|
||||
|
||||
- name: Add LLVM Repo (Linux)
|
||||
if: inputs.llvm == 'true' && runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
|
||||
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-20 main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
|
||||
- name: apt-get update + install
|
||||
if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.cuda == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true')
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'Acquire::GzipIndexes "true";' | sudo tee /etc/apt/apt.conf.d/gzip
|
||||
echo 'Acquire::http::Pipeline-Depth "5";' | sudo tee -a /etc/apt/apt.conf.d/99parallel
|
||||
sudo apt -qq update || true
|
||||
|
||||
pkgs=""
|
||||
# **** OpenCL ****
|
||||
if [[ "${{ inputs.opencl }}" == "true" ]]; then
|
||||
pkgs+=" opencl-headers \
|
||||
intel-oneapi-runtime-openmp=2023.2.1-16 intel-oneapi-runtime-compilers-common=2023.2.1-16 intel-oneapi-runtime-compilers=2023.2.1-16 \
|
||||
intel-oneapi-runtime-dpcpp-sycl-opencl-cpu=2023.2.1-16 intel-oneapi-runtime-tbb-common=2021.10.0-49541 \
|
||||
intel-oneapi-runtime-tbb=2021.10.0-49541 intel-oneapi-runtime-opencl=2023.2.1-16"
|
||||
fi
|
||||
# **** AMD ****
|
||||
if [[ "${{ inputs.amd }}" == "true" ]]; then
|
||||
pkgs+=" hsa-rocr comgr hsa-rocr-dev liburing-dev libibverbs-dev libc6-dev"
|
||||
fi
|
||||
# **** CUDA ****
|
||||
if [[ "${{ inputs.cuda }}" == "true" ]]; then
|
||||
pkgs+=" git g++ cmake ninja-build llvm-15-dev zlib1g-dev libglew-dev \
|
||||
flex bison libfl-dev libboost-thread-dev libboost-filesystem-dev nvidia-cuda-toolkit-gcc libzstd-dev"
|
||||
fi
|
||||
# **** WebGPU (dependencies for software-based vulkan) ****
|
||||
if [[ "${{ inputs.webgpu }}" == "true" ]]; then
|
||||
pkgs+=" libgl1 libglx-mesa0 libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers"
|
||||
fi
|
||||
# **** LLVM ****
|
||||
if [[ "${{ inputs.llvm }}" == "true" ]]; then
|
||||
pkgs+=" libllvm20 clang-20 lld-20"
|
||||
fi
|
||||
|
||||
# ******** do install ********
|
||||
if [[ -n "$pkgs" ]]; then
|
||||
sudo apt-get -y --allow-unauthenticated --no-install-recommends install $pkgs
|
||||
fi
|
||||
|
||||
# **** AMD ****
|
||||
|
||||
- name: Setup AMD (Linux)
|
||||
if: inputs.amd == 'true' && runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
cargo build --release --manifest-path ./extra/remu/Cargo.toml
|
||||
sudo ln -sf ${{ github.workspace }}/extra/remu/target/release/libremu.so /usr/local/lib/libremu.so
|
||||
sudo tee --append /etc/ld.so.conf.d/rocm.conf <<'EOF'
|
||||
/opt/rocm/lib
|
||||
/opt/rocm/lib64
|
||||
EOF
|
||||
sudo ldconfig
|
||||
- name: Setup AMD comgr+remu (macOS)
|
||||
if: inputs.amd == 'true' && runner.os == 'macOS'
|
||||
shell: bash
|
||||
run: |
|
||||
sudo mkdir -p /usr/local/lib
|
||||
curl -s -H "Authorization: token $GH_TOKEN" curl -s https://api.github.com/repos/nimlgen/amdcomgr_dylib/releases/latest | \
|
||||
jq -r '.assets[] | select(.name == "libamd_comgr.dylib").browser_download_url' | \
|
||||
sudo xargs curl -L -o /usr/local/lib/libamd_comgr.dylib
|
||||
cargo build --release --manifest-path ./extra/remu/Cargo.toml
|
||||
|
||||
# **** gpuocelot ****
|
||||
|
||||
- name: Install gpuocelot dependencies (MacOS)
|
||||
if: inputs.ocelot == 'true' && runner.os == 'macOS'
|
||||
shell: bash
|
||||
run: brew install --quiet cmake ninja llvm@15 zlib glew flex bison boost zstd ncurses
|
||||
- name: Cache gpuocelot
|
||||
if: inputs.ocelot == 'true'
|
||||
id: cache-build
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-gpuocelot-build
|
||||
with:
|
||||
path: ${{ github.workspace }}/gpuocelot/ocelot
|
||||
key: ${{ runner.os }}-gpuocelot-b16039dc940dc6bc4ea0a98380495769ff35ed99-rebuild-0
|
||||
- name: Clone/compile gpuocelot
|
||||
if: inputs.ocelot == 'true' && steps.cache-build.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
git clone --recurse-submodules https://github.com/gpuocelot/gpuocelot.git ${{ github.workspace }}/gpuocelot
|
||||
cd ${{ github.workspace }}/gpuocelot/ocelot
|
||||
git checkout b16039dc940dc6bc4ea0a98380495769ff35ed99
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -Wno-dev -G Ninja -DOCELOT_BUILD_TOOLS=OFF -DCMAKE_BUILD_ALWAYS=0 -DBUILD_TESTS_CUDA=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
ninja
|
||||
- name: Install gpuocelot
|
||||
if: inputs.ocelot == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
cd ${{ github.workspace }}/gpuocelot/ocelot/build
|
||||
sudo cp libgpuocelot.${{ runner.os == 'macOS' && 'dylib' || 'so' }} /usr/${{ runner.os == 'macOS' && 'local/' || ''}}lib/
|
||||
|
||||
# **** WebGPU ****
|
||||
|
||||
- name: Install WebGPU dawn (Linux)
|
||||
if: inputs.webgpu == 'true' && runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
sudo curl -L https://github.com/wpmed92/pydawn/releases/download/v0.1.6/libwebgpu_dawn.so -o /usr/local/lib/libwebgpu_dawn.so
|
||||
sudo ldconfig
|
||||
- name: Install WebGPU dawn (macOS)
|
||||
if: inputs.webgpu == 'true' && runner.os == 'macOS'
|
||||
shell: bash
|
||||
run: |
|
||||
brew tap wpmed92/dawn
|
||||
brew install dawn
|
||||
|
||||
# **** LLVM ****
|
||||
|
||||
- name: Install LLVM (macOS)
|
||||
if: inputs.llvm == 'true' && runner.os == 'macOS'
|
||||
shell: bash
|
||||
run: brew install llvm@20
|
||||
+132
-255
@@ -1,8 +1,7 @@
|
||||
name: Benchmarks
|
||||
env:
|
||||
# TODO: this rescheduling makes gpt2, mixtral and llama unjitted slower
|
||||
# TODO: very slow for llama 70B and resnet training 6 GPU
|
||||
CAPTURE_PROCESS_REPLAY: "1"
|
||||
RUN_PROCESS_REPLAY: "1"
|
||||
ASSERT_PROCESS_REPLAY: "0"
|
||||
PYTHONPATH: .
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -24,14 +23,10 @@ on:
|
||||
jobs:
|
||||
testmacbenchmark:
|
||||
name: Mac Benchmark
|
||||
env:
|
||||
# since sudo is required for usbgpu on macos, move the cache to a new location, as some of the files are owned by root
|
||||
PYTHONPYCACHEPREFIX: /tmp/tiny_python_pycache
|
||||
runs-on: [self-hosted, macOS]
|
||||
timeout-minutes: 20
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -e -o pipefail {0}
|
||||
shell: bash -o pipefail {0}
|
||||
if: github.repository_owner == 'tinygrad'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
@@ -50,80 +45,55 @@ jobs:
|
||||
echo "CACHEDB=/tmp/staging.db" >> $GITHUB_ENV
|
||||
rm -f /tmp/staging.db /tmp/staging.db-shm /tmp/staging.db-wal
|
||||
- name: reset process replay
|
||||
run: python3.11 test/external/process_replay/reset.py
|
||||
run: test/external/process_replay/reset.py
|
||||
- name: Run Stable Diffusion
|
||||
run: BENCHMARK_LOG=stable_diffusion JIT=1 python3.11 examples/stable_diffusion.py --fp16 --seed 0 --noshow --timing | tee sd.txt
|
||||
- name: Run Stable Diffusion without fp16
|
||||
run: BENCHMARK_LOG=stable_diffusion_fp32 JIT=1 python3.11 examples/stable_diffusion.py --seed 0 --noshow --timing | tee sd_no_fp16.txt
|
||||
- name: Run Stable Diffusion v2
|
||||
run: BENCHMARK_LOG=stable_diffusion_v2 JIT=1 python3.11 examples/sdv2.py --fp16 --seed 0 --noshow --timing | tee sdv2.txt
|
||||
# process replay can't capture this, the graph is too large
|
||||
run: JIT=2 python3 examples/stable_diffusion.py --seed 0 --noshow --timing | tee sd.txt
|
||||
- name: Run Stable Diffusion with fp16
|
||||
run: JIT=2 python3 examples/stable_diffusion.py --fp16 --seed 0 --noshow --timing | tee sd_fp16.txt
|
||||
- name: Run SDXL
|
||||
run: BENCHMARK_LOG=stable_diffusion_xl CAPTURE_PROCESS_REPLAY=0 JIT=1 python3.11 examples/sdxl.py --seed 0 --noshow --timing | tee sdxl.txt
|
||||
run: JIT=2 python3 examples/sdxl.py --seed 0 --noshow --timing | tee sdxl.txt
|
||||
- name: Run model inference benchmark
|
||||
run: METAL=1 python3.11 test/external/external_model_benchmark.py
|
||||
- name: Run huggingface_onnx test
|
||||
run: METAL=1 python3.11 extra/huggingface_onnx/run_models.py test --debug FacebookAI/xlm-roberta-large
|
||||
run: METAL=1 python3 test/external/external_model_benchmark.py
|
||||
- name: Test speed vs torch
|
||||
run: BIG=2 MPS=1 python3.11 test/test_speed_v_torch.py | tee torch_speed.txt
|
||||
run: BIG=2 MPS=1 python3 test/test_speed_v_torch.py | tee torch_speed.txt
|
||||
- name: Test tensor cores
|
||||
run: METAL=1 python3.11 test/test_linearizer.py TestLinearizer.test_tensor_cores TestLinearizer.test_tensor_cores_padded TestLinearizer.test_tensor_cores_padded_uops
|
||||
- name: Test AMX tensor cores
|
||||
run: METAL=1 python3 test/test_linearizer.py TestLinearizer.test_tensor_cores TestLinearizer.test_tensor_cores_padded
|
||||
- name: Run Tensor Core GEMM
|
||||
run: |
|
||||
DEBUG=2 CPU=1 AMX=1 python3.11 test/test_linearizer.py TestLinearizer.test_tensor_cores TestLinearizer.test_tensor_cores_padded TestLinearizer.test_tensor_cores_padded_uops TestFloat4.test_float4_multidim_amx TestFloat4.test_float4_multidim_unaligned_load_amx
|
||||
DEBUG=2 LLVM=1 AMX=1 python3.11 test/test_linearizer.py TestLinearizer.test_tensor_cores TestLinearizer.test_tensor_cores_padded TestLinearizer.test_tensor_cores_padded_uops TestFloat4.test_float4_multidim_amx TestFloat4.test_float4_multidim_unaligned_load_amx
|
||||
- name: Run Tensor Core GEMM (float)
|
||||
run: DEBUG=2 SHOULD_USE_TC=1 python3.11 extra/gemm/simple_matmul.py | tee matmul.txt
|
||||
- name: Run Tensor Core GEMM (half)
|
||||
run: DEBUG=2 SHOULD_USE_TC=1 HALF=1 python3.11 extra/gemm/simple_matmul.py | tee matmul_half.txt
|
||||
- name: Run Tensor Core GEMM (bfloat16)
|
||||
run: DEBUG=2 SHOULD_USE_TC=1 BFLOAT16=1 python3.11 extra/gemm/simple_matmul.py | tee matmul_bfloat16.txt
|
||||
DEBUG=2 python3 extra/gemm/simple_matmul.py | tee matmul.txt
|
||||
DEBUG=2 HALF=1 python3 extra/gemm/simple_matmul.py | tee matmul_half.txt
|
||||
- name: Fuzz Padded Tensor Core GEMM
|
||||
run: METAL=1 M_START=6 M_STOP=10 M_STEP=1 N_START=6 N_STOP=10 N_STEP=1 K_START=6 K_STOP=24 K_STEP=1 TC_OPT=2 DEBUG=2 python3.11 ./extra/gemm/fuzz_matmul.py
|
||||
run: METAL=1 M_START=6 M_STOP=10 M_STEP=1 N_START=6 N_STOP=10 N_STEP=1 K_START=6 K_STOP=24 K_STEP=1 TC_OPT=2 DEBUG=2 python3 ./extra/gemm/fuzz_matmul.py
|
||||
- name: Run LLaMA
|
||||
run: |
|
||||
BENCHMARK_LOG=llama_nojit JIT=0 python3.11 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_unjitted.txt
|
||||
BENCHMARK_LOG=llama JIT=1 python3.11 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_jitted.txt
|
||||
JIT=0 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_unjitted.txt
|
||||
JIT=1 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_jitted.txt
|
||||
- name: Run LLaMA with BEAM
|
||||
run: BENCHMARK_LOG=llama_beam JITBEAM=2 IGNORE_BEAM_CACHE=1 python3.11 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_beam.txt
|
||||
run: JITBEAM=2 IGNORE_BEAM_CACHE=1 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_beam.txt
|
||||
- name: Run quantized LLaMA
|
||||
run: |
|
||||
BENCHMARK_LOG=llama_int8 python3.11 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing --quantize int8 | tee llama_int8.txt
|
||||
BENCHMARK_LOG=llama_nf4 python3.11 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing --quantize nf4 | tee llama_nf4.txt
|
||||
- name: Run quantized LLaMA3
|
||||
run: |
|
||||
BENCHMARK_LOG=llama3_int8 python3.11 examples/llama3.py --size 8B --temperature 0 --benchmark --quantize int8 | tee llama3_int8.txt
|
||||
BENCHMARK_LOG=llama3_nf4 python3.11 examples/llama3.py --size 8B --temperature 0 --benchmark --quantize nf4 | tee llama3_nf4.txt
|
||||
#- name: Run LLaMA 7B on 4 (virtual) GPUs
|
||||
# run: python3.11 examples/llama.py --gen 1 --size 7B --shard 4 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_four_gpu.txt
|
||||
python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing --quantize int8 | tee llama_int8.txt
|
||||
python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing --quantize nf4 | tee llama_nf4.txt
|
||||
- name: Run LLaMA 7B on 4 (virtual) GPUs
|
||||
run: python3 examples/llama.py --gen 1 --size 7B --shard 4 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_four_gpu.txt
|
||||
- name: Run GPT2
|
||||
run: |
|
||||
BENCHMARK_LOG=gpt2_nojit JIT=0 python3.11 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_unjitted.txt
|
||||
BENCHMARK_LOG=gpt2 JIT=1 python3.11 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_jitted.txt
|
||||
JIT=0 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_unjitted.txt
|
||||
JIT=1 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_jitted.txt
|
||||
- name: Run GPT2 w HALF
|
||||
run: BENCHMARK_LOG=gpt2_half HALF=1 python3.11 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half.txt
|
||||
run: HALF=1 python3 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half.txt
|
||||
- name: Run GPT2 w HALF/BEAM
|
||||
run: BENCHMARK_LOG=gpt2_half_beam HALF=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 python3.11 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half_beam.txt
|
||||
- name: Run OLMoE
|
||||
run: BENCHMARK_LOG=olmoe python3.11 examples/olmoe.py
|
||||
run: HALF=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 CAST_BEFORE_VIEW=0 python3 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half_beam.txt
|
||||
- name: Train MNIST
|
||||
run: time PYTHONPATH=. TARGET_EVAL_ACC_PCT=96.0 python3.11 examples/beautiful_mnist.py | tee beautiful_mnist.txt
|
||||
run: time PYTHONPATH=. TARGET_EVAL_ACC_PCT=97.3 python3 examples/beautiful_mnist.py | tee beautiful_mnist.txt
|
||||
- name: Run 10 CIFAR training steps
|
||||
run: BENCHMARK_LOG=cifar_10steps JIT=1 STEPS=10 python3.11 examples/hlb_cifar10.py | tee train_cifar.txt
|
||||
run: JIT=2 STEPS=10 python3 examples/hlb_cifar10.py | tee train_cifar.txt
|
||||
- name: Run 10 CIFAR training steps w HALF
|
||||
run: BENCHMARK_LOG=cifar_10steps_half JIT=2 STEPS=10 DEFAULT_FLOAT=HALF python3.11 examples/hlb_cifar10.py | tee train_cifar_half.txt
|
||||
run: JIT=2 STEPS=10 DEFAULT_FLOAT=HALF python3 examples/hlb_cifar10.py | tee train_cifar_half.txt
|
||||
#- name: Run 10 CIFAR training steps w BF16
|
||||
# run: STEPS=10 DEFAULT_FLOAT=BFLOAT16 python3.11 examples/hlb_cifar10.py | tee train_cifar_bf16.txt
|
||||
# run: STEPS=10 DEFAULT_FLOAT=BFLOAT16 python3 examples/hlb_cifar10.py | tee train_cifar_bf16.txt
|
||||
- name: Run 10 CIFAR training steps w winograd
|
||||
run: BENCHMARK_LOG=cifar_10steps_wino JIT=1 WINO=1 STEPS=10 python3.11 examples/hlb_cifar10.py | tee train_cifar_wino.txt
|
||||
- name: UsbGPU boot time
|
||||
run: sudo -E PYTHONPATH=. DEBUG=2 AM_RESET=1 AMD=1 AMD_IFACE=USB time python3.11 test/test_tiny.py TestTiny.test_plus
|
||||
- name: UsbGPU tiny tests
|
||||
run: sudo -E PYTHONPATH=. AMD=1 AMD_IFACE=USB python3.11 test/test_tiny.py
|
||||
- name: UsbGPU copy speeds
|
||||
run: sudo -E PYTHONPATH=. AMD=1 AMD_IFACE=USB python3.11 test/external/external_test_usb_asm24.py TestDevCopySpeeds
|
||||
- name: UsbGPU openpilot test
|
||||
run: sudo -E PYTHONPATH=. AMD=1 AMD_IFACE=USB NOLOCALS=0 IMAGE=0 GRAPH_ONE_KERNEL=1 python3.11 examples/openpilot/compile3.py https://github.com/commaai/openpilot/raw/9118973ed03c1ae1d40cf69a29507ec2cc78efd7/selfdrive/modeld/models/supercombo.onnx
|
||||
run: JIT=2 WINO=1 STEPS=10 python3 examples/hlb_cifar10.py | tee train_cifar_wino.txt
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Speed (Mac)
|
||||
@@ -135,8 +105,6 @@ jobs:
|
||||
llama_beam.txt
|
||||
llama_int8.txt
|
||||
llama_nf4.txt
|
||||
llama3_int8.txt
|
||||
llama3_nf4.txt
|
||||
llama_four_gpu.txt
|
||||
gpt2_unjitted.txt
|
||||
gpt2_jitted.txt
|
||||
@@ -144,10 +112,8 @@ jobs:
|
||||
gpt2_half_beam.txt
|
||||
matmul.txt
|
||||
matmul_half.txt
|
||||
matmul_bfloat16.txt
|
||||
sd.txt
|
||||
sd_no_fp16.txt
|
||||
sdv2.txt
|
||||
sd_fp16.txt
|
||||
sdxl.txt
|
||||
beautiful_mnist.txt
|
||||
train_cifar.txt
|
||||
@@ -155,15 +121,14 @@ jobs:
|
||||
train_cifar_bf16.txt
|
||||
train_cifar_wino.txt
|
||||
- name: Run process replay tests
|
||||
run: cp test/external/process_replay/process_replay.py ./process_replay.py && git fetch origin master && git -c advice.detachedHead=false checkout origin/master && PYTHONPATH=. python3.11 process_replay.py
|
||||
run: cp test/external/process_replay/process_replay.py ./process_replay.py && git fetch origin master && git -c advice.detachedHead=false checkout origin/master && PYTHONPATH=. python3 process_replay.py
|
||||
|
||||
testnvidiabenchmark:
|
||||
name: tinybox green Benchmark
|
||||
runs-on: [self-hosted, Linux, tinyboxgreen]
|
||||
timeout-minutes: 30
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -e -o pipefail {0}
|
||||
shell: bash -o pipefail {0}
|
||||
if: github.repository_owner == 'tinygrad'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
@@ -187,62 +152,55 @@ jobs:
|
||||
- name: reset process replay
|
||||
run: test/external/process_replay/reset.py
|
||||
- name: Run model inference benchmark
|
||||
run: NV=1 CAPTURE_PROCESS_REPLAY=0 NOCLANG=1 python3 test/external/external_model_benchmark.py
|
||||
run: NV=1 NOCLANG=1 python3 test/external/external_model_benchmark.py
|
||||
- name: Test speed vs torch
|
||||
run: NV=1 CAPTURE_PROCESS_REPLAY=0 HALF=1 BIG=2 TORCHCUDA=1 python3 test/test_speed_v_torch.py | tee torch_speed.txt
|
||||
- name: Test speed vs theoretical
|
||||
run: NV=1 IGNORE_BEAM_CACHE=1 BEAM_DEBUG=1 DEBUG=1 python -m pytest -rA test/external/speed_v_theoretical.py --durations=20
|
||||
- name: Test benchmark allreduce
|
||||
run: NV=1 python test/external/external_benchmark_multitensor_allreduce.py
|
||||
run: NV=1 BIG=2 TORCHCUDA=1 python3 test/test_speed_v_torch.py | tee torch_speed.txt
|
||||
- name: Test tensor cores
|
||||
run: |
|
||||
NV=1 ALLOW_TF32=1 python3 test/test_linearizer.py TestLinearizer.test_tensor_cores TestLinearizer.test_tensor_cores_padded TestLinearizer.test_tensor_cores_padded_uops
|
||||
PTX=1 ALLOW_TF32=1 NV=1 python3 test/test_linearizer.py TestLinearizer.test_tensor_cores TestLinearizer.test_tensor_cores_padded TestLinearizer.test_tensor_cores_padded_uops
|
||||
NV=1 python3 test/test_linearizer.py TestLinearizer.test_tensor_cores TestLinearizer.test_tensor_cores_padded
|
||||
PTX=1 NV=1 python3 test/test_linearizer.py TestLinearizer.test_tensor_cores TestLinearizer.test_tensor_cores_padded
|
||||
- name: Run Tensor Core GEMM (CUDA)
|
||||
run: |
|
||||
CUDA=1 SHOULD_USE_TC=1 HALF=1 DEBUG=2 python3 extra/gemm/simple_matmul.py | tee matmul.txt
|
||||
CUDA=1 SHOULD_USE_TC=1 BFLOAT16=1 DEBUG=2 python3 extra/gemm/simple_matmul.py | tee matmul_bfloat16.txt
|
||||
CUDA=1 SHOULD_USE_TC=1 ALLOW_TF32=1 DEBUG=2 ATOL=2e-2 python3 extra/gemm/simple_matmul.py | tee matmul_tf32.txt
|
||||
CUDA=1 HALF=1 DEBUG=2 python3 extra/gemm/simple_matmul.py | tee matmul.txt
|
||||
CUDA=1 BFLOAT16=1 DEBUG=2 python3 extra/gemm/simple_matmul.py | tee matmul_bfloat16.txt
|
||||
- name: Run Tensor Core GEMM (PTX)
|
||||
run: NV=1 PTX=1 SHOULD_USE_TC=1 HALF=1 DEBUG=2 python3 extra/gemm/simple_matmul.py | tee matmul_ptx.txt
|
||||
run: NV=1 PTX=1 HALF=1 DEBUG=2 python3 extra/gemm/simple_matmul.py | tee matmul_ptx.txt
|
||||
- name: Run Tensor Core GEMM (NV)
|
||||
run: NV=1 SHOULD_USE_TC=1 HALF=1 DEBUG=2 python3 extra/gemm/simple_matmul.py | tee matmul_nv.txt
|
||||
- name: Test NV=1
|
||||
run: DEBUG=2 NV=1 python -m pytest -rA test/test_tiny.py
|
||||
- name: Test CUDA=1
|
||||
run: DEBUG=2 CUDA=1 python -m pytest -rA test/test_tiny.py
|
||||
run: NV=1 HALF=1 DEBUG=2 python3 extra/gemm/simple_matmul.py | tee matmul_nv.txt
|
||||
- name: Run Tensor Core GEMM (NV) with BEAM
|
||||
run: BEAM=4 NV=1 HALF=1 IGNORE_BEAM_CACHE=1 DEBUG=2 python3 extra/gemm/simple_matmul.py
|
||||
- name: Run Stable Diffusion
|
||||
run: BENCHMARK_LOG=stable_diffusion NV=1 python3 examples/stable_diffusion.py --fp16 --seed 0 --noshow --timing | tee sd.txt
|
||||
run: NV=1 python3 examples/stable_diffusion.py --seed 0 --noshow --timing | tee sd.txt
|
||||
- name: Run SDXL
|
||||
run: BENCHMARK_LOG=stable_diffusion_xl CAPTURE_PROCESS_REPLAY=0 NV=1 CAPTURE_PROCESS_REPLAY=0 python3 examples/sdxl.py --seed 0 --noshow --timing | tee sdxl.txt
|
||||
run: NV=1 python3 examples/sdxl.py --seed 0 --noshow --timing | tee sdxl.txt
|
||||
- name: Run LLaMA
|
||||
run: |
|
||||
BENCHMARK_LOG=llama_nojit NV=1 JIT=0 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_unjitted.txt
|
||||
BENCHMARK_LOG=llama NV=1 JIT=1 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_jitted.txt
|
||||
NV=1 JIT=0 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_unjitted.txt
|
||||
NV=1 JIT=1 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_jitted.txt
|
||||
- name: Run LLaMA with BEAM
|
||||
run: BENCHMARK_LOG=llama_beam NV=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_beam.txt
|
||||
# - name: Run LLaMA 7B on 4 GPUs
|
||||
# run: NV=1 CAPTURE_PROCESS_REPLAY=0 python3 examples/llama.py --gen 1 --size 7B --shard 4 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_four_gpu.txt
|
||||
# - name: Run LLaMA 7B on 6 GPUs
|
||||
# run: NV=1 CAPTURE_PROCESS_REPLAY=0 python3 examples/llama.py --gen 1 --size 7B --shard 6 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_six_gpu.txt
|
||||
run: NV=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_beam.txt
|
||||
- name: Run LLaMA 7B on 4 GPUs
|
||||
run: NV=1 python3 examples/llama.py --gen 1 --size 7B --shard 4 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_four_gpu.txt
|
||||
- name: Run LLaMA 7B on 6 GPUs
|
||||
run: NV=1 python3 examples/llama.py --gen 1 --size 7B --shard 6 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_six_gpu.txt
|
||||
- name: Run LLaMA-3 8B BEAM
|
||||
run: BENCHMARK_LOG=llama3_beam NV=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 python3 examples/llama3.py --size 8B --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_beam.txt
|
||||
- name: Run LLaMA-3 8B on 4 GPUs with BEAM
|
||||
run: BENCHMARK_LOG=llama3_beam_4gpu NV=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 CAPTURE_PROCESS_REPLAY=0 python3 examples/llama3.py --size 8B --shard 4 --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_four_gpu.txt
|
||||
# - name: Run LLaMA-3 8B on 6 GPUs
|
||||
# run: NV=1 CAPTURE_PROCESS_REPLAY=0 python3 examples/llama3.py --size 8B --shard 6 --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_six_gpu.txt
|
||||
# - name: Run LLaMA-2 70B
|
||||
# run: NV=1 CAPTURE_PROCESS_REPLAY=0 MAX_CONTEXT=256 python3 examples/llama.py --gen 2 --size 70B --shard 6 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_2_70B.txt
|
||||
run: NV=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 python3 examples/llama3.py --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_beam.txt
|
||||
- name: Run LLaMA-3 8B on 4 GPUs
|
||||
run: NV=1 python3 examples/llama3.py --shard 4 --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_four_gpu.txt
|
||||
- name: Run LLaMA-3 8B on 6 GPUs
|
||||
run: NV=1 python3 examples/llama3.py --shard 6 --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_six_gpu.txt
|
||||
- name: Run LLaMA-2 70B
|
||||
run: NV=1 MAX_CONTEXT=256 python3 examples/llama.py --gen 2 --size 70B --shard 6 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_2_70B.txt
|
||||
- name: Run Mixtral 8x7B
|
||||
run: time BENCHMARK_LOG=mixtral NV=1 CAPTURE_PROCESS_REPLAY=0 python3 examples/mixtral.py --temperature 0 --count 10 --timing | tee mixtral.txt
|
||||
run: time NV=1 python3 examples/mixtral.py --temperature 0 --count 10 --timing | tee mixtral.txt
|
||||
- name: Run GPT2
|
||||
run: |
|
||||
BENCHMARK_LOG=gpt2_nojit NV=1 JIT=0 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_unjitted.txt
|
||||
BENCHMARK_LOG=gpt2 NV=1 JIT=1 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_jitted.txt
|
||||
NV=1 JIT=0 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_unjitted.txt
|
||||
NV=1 JIT=1 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_jitted.txt
|
||||
- name: Run GPT2 w HALF
|
||||
run: BENCHMARK_LOG=gpt2_half NV=1 HALF=1 python3 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half.txt
|
||||
run: NV=1 HALF=1 python3 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half.txt
|
||||
- name: Run GPT2 w HALF/BEAM
|
||||
run: BENCHMARK_LOG=gpt2_half_beam NV=1 HALF=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 python3 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half_beam.txt
|
||||
run: NV=1 HALF=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 CAST_BEFORE_VIEW=0 python3 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half_beam.txt
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Speed (NVIDIA)
|
||||
@@ -251,7 +209,6 @@ jobs:
|
||||
torch_speed.txt
|
||||
matmul.txt
|
||||
matmul_bfloat16.txt
|
||||
matmul_tf32.txt
|
||||
matmul_ptx.txt
|
||||
matmul_nv.txt
|
||||
sd.txt
|
||||
@@ -259,6 +216,8 @@ jobs:
|
||||
llama_unjitted.txt
|
||||
llama_jitted.txt
|
||||
llama_beam.txt
|
||||
llama_four_gpu.txt
|
||||
llama_six_gpu.txt
|
||||
llama3_beam.txt
|
||||
llama3_four_gpu.txt
|
||||
llama3_six_gpu.txt
|
||||
@@ -274,10 +233,9 @@ jobs:
|
||||
testmorenvidiabenchmark:
|
||||
name: tinybox green Training Benchmark
|
||||
runs-on: [self-hosted, Linux, tinyboxgreen]
|
||||
timeout-minutes: 20
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -e -o pipefail {0}
|
||||
shell: bash -o pipefail {0}
|
||||
if: github.repository_owner == 'tinygrad'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
@@ -304,28 +262,25 @@ jobs:
|
||||
- name: Fuzz Padded Tensor Core GEMM (PTX)
|
||||
run: NV=1 PTX=1 M_START=12 M_STOP=20 M_STEP=1 N_START=6 N_STOP=10 N_STEP=1 K_START=28 K_STOP=36 K_STEP=1 HALF=1 TC_OPT=2 python3 ./extra/gemm/fuzz_matmul.py
|
||||
- name: Train MNIST
|
||||
run: time PYTHONPATH=. NV=1 TARGET_EVAL_ACC_PCT=96.0 python3 examples/beautiful_mnist.py | tee beautiful_mnist.txt
|
||||
run: time PYTHONPATH=. NV=1 TARGET_EVAL_ACC_PCT=97.3 python3 examples/beautiful_mnist.py | tee beautiful_mnist.txt
|
||||
- name: Run 10 CIFAR training steps
|
||||
run: BENCHMARK_LOG=cifar_10steps NV=1 STEPS=10 python3 examples/hlb_cifar10.py | tee train_cifar.txt
|
||||
run: NV=1 STEPS=10 python3 examples/hlb_cifar10.py | tee train_cifar.txt
|
||||
- name: Run 10 CIFAR training steps w HALF
|
||||
run: BENCHMARK_LOG=cifar_10steps_half NV=1 STEPS=10 DEFAULT_FLOAT=HALF python3 examples/hlb_cifar10.py | tee train_cifar_half.txt
|
||||
run: NV=1 STEPS=10 DEFAULT_FLOAT=HALF python3 examples/hlb_cifar10.py | tee train_cifar_half.txt
|
||||
- name: Run 10 CIFAR training steps w BF16
|
||||
run: BENCHMARK_LOG=cifar_10steps_bf16 NV=1 STEPS=10 DEFAULT_FLOAT=BFLOAT16 python3 examples/hlb_cifar10.py | tee train_cifar_bf16.txt
|
||||
run: NV=1 STEPS=10 DEFAULT_FLOAT=BFLOAT16 python3 examples/hlb_cifar10.py | tee train_cifar_bf16.txt
|
||||
- name: Run 10 CIFAR training steps w winograd
|
||||
run: BENCHMARK_LOG=cifar_10steps_half_wino NV=1 CAPTURE_PROCESS_REPLAY=0 WINO=1 STEPS=10 DEFAULT_FLOAT=HALF python3 examples/hlb_cifar10.py | tee train_cifar_wino.txt
|
||||
run: NV=1 WINO=1 STEPS=10 python3 examples/hlb_cifar10.py | tee train_cifar_wino.txt
|
||||
- name: Run full CIFAR training w 1 GPU
|
||||
run: time BENCHMARK_LOG=cifar NV=1 DEFAULT_FLOAT=HALF LATEWINO=1 STEPS=1000 TARGET_EVAL_ACC_PCT=93.2 python3 examples/hlb_cifar10.py | tee train_cifar_one_gpu.txt
|
||||
run: time NV=1 DEFAULT_FLOAT=HALF LATEWINO=1 STEPS=1000 TARGET_EVAL_ACC_PCT=93.2 python3 examples/hlb_cifar10.py | tee train_cifar_one_gpu.txt
|
||||
- name: Run full CIFAR training steps w 6 GPUS
|
||||
run: time BENCHMARK_LOG=cifar_6gpu CAPTURE_PROCESS_REPLAY=0 NV=1 DEFAULT_FLOAT=HALF STEPS=350 BS=1536 GPUS=6 TARGET_EVAL_ACC_PCT=93.2 python3 examples/hlb_cifar10.py | tee train_cifar_six_gpu.txt
|
||||
run: time NV=1 DEFAULT_FLOAT=HALF STEPS=350 BS=1536 GPUS=6 TARGET_EVAL_ACC_PCT=93.2 python3 examples/hlb_cifar10.py | tee train_cifar_six_gpu.txt
|
||||
- name: Run MLPerf resnet eval on training data
|
||||
run: time BENCHMARK_LOG=resnet_eval NV=1 MODEL=resnet python3 examples/mlperf/model_eval.py
|
||||
run: time NV=1 MODEL=resnet python3 examples/mlperf/model_eval.py
|
||||
- name: Run 10 MLPerf ResNet50 training steps (1 gpu)
|
||||
run: BENCHMARK_LOG=resnet_10steps NV=1 DEFAULT_FLOAT=HALF BENCHMARK=10 BS=256 GPUS=1 MODEL=resnet python3 examples/mlperf/model_train.py | tee train_resnet_one_gpu.txt
|
||||
run: NV=1 DEFAULT_FLOAT=HALF BENCHMARK=10 BS=256 GPUS=1 MODEL=resnet python3 examples/mlperf/model_train.py | tee train_resnet_one_gpu.txt
|
||||
- name: Run 10 MLPerf ResNet50 training steps (6 gpu)
|
||||
run: BENCHMARK_LOG=resnet_10steps_6gpu NV=1 CAPTURE_PROCESS_REPLAY=0 DEFAULT_FLOAT=HALF BENCHMARK=10 BS=1536 GPUS=6 MODEL=resnet python3 examples/mlperf/model_train.py | tee train_resnet.txt
|
||||
- name: Run 10 MLPerf Bert training steps (6 gpu)
|
||||
# TODO: remove BERT_LAYERS once scheduler is fast
|
||||
run: BENCHMARK_LOG=bert_10steps_6gpu NV=1 CAPTURE_PROCESS_REPLAY=0 DEFAULT_FLOAT=HALF BENCHMARK=10 BS=66 GPUS=6 BERT_LAYERS=2 FUSE_ARANGE=1 FUSE_ARANGE_UINT=0 MODEL=bert python3 examples/mlperf/model_train.py | tee train_bert.txt
|
||||
run: NV=1 DEFAULT_FLOAT=HALF BENCHMARK=10 BS=1536 GPUS=6 MODEL=resnet python3 examples/mlperf/model_train.py | tee train_resnet.txt
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Speed (NVIDIA Training)
|
||||
@@ -336,30 +291,22 @@ jobs:
|
||||
train_cifar_bf16.txt
|
||||
train_cifar_wino.txt
|
||||
train_cifar_one_gpu.txt
|
||||
train_cifar_six_gpu.txt
|
||||
train_resnet.txt
|
||||
train_resnet_one_gpu.txt
|
||||
train_bert.txt
|
||||
train_cifar_six_gpu.txt
|
||||
- name: Run process replay tests
|
||||
run: cp test/external/process_replay/process_replay.py ./process_replay.py && git fetch origin master && git -c advice.detachedHead=false checkout origin/master && PYTHONPATH=. python3 process_replay.py
|
||||
|
||||
testamdbenchmark:
|
||||
name: tinybox red Benchmark
|
||||
runs-on: [self-hosted, Linux, tinybox]
|
||||
timeout-minutes: 20
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -e -o pipefail {0}
|
||||
shell: bash -o pipefail {0}
|
||||
if: github.repository_owner == 'tinygrad'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
- name: Remove amdgpu
|
||||
run: sudo rmmod amdgpu || true
|
||||
- name: Cleanup running AM processes
|
||||
run: python extra/amdpci/am_smi.py --pids --kill
|
||||
#- name: Insert amdgpu
|
||||
# run: sudo modprobe amdgpu
|
||||
- name: Symlink models and datasets
|
||||
run: |
|
||||
mkdir -p weights
|
||||
@@ -378,12 +325,8 @@ jobs:
|
||||
rm -f /tmp/staging.db /tmp/staging.db-shm /tmp/staging.db-wal
|
||||
- name: reset process replay
|
||||
run: test/external/process_replay/reset.py
|
||||
#- name: setup perflevel
|
||||
# run: |
|
||||
# examples/mlperf/training_submission_v4.1/tinycorp/benchmarks/bert/implementations/tinybox_red/setup.sh
|
||||
# rocm-smi
|
||||
#- name: Show off tinybox
|
||||
# run: /opt/rocm/bin/rocm-bandwidth-test
|
||||
- name: Show off tinybox
|
||||
run: /opt/rocm/bin/rocm-bandwidth-test
|
||||
# TODO: unstable on AMD
|
||||
#- name: Run model inference benchmark
|
||||
# run: LD_PRELOAD="/opt/rocm/lib/libhsa-runtime64.so" HSA=1 NOCLANG=1 python3 test/external/external_model_benchmark.py
|
||||
@@ -392,62 +335,46 @@ jobs:
|
||||
# run: |
|
||||
# python3 -c "import torch; print(torch.__version__)"
|
||||
# LD_PRELOAD="/opt/rocm/lib/libhsa-runtime64.so" HSA=1 BIG=2 TORCHCUDA=1 python3 test/test_speed_v_torch.py | tee torch_speed.txt
|
||||
- name: Test speed vs theoretical
|
||||
run: AMD=1 IGNORE_BEAM_CACHE=1 BEAM_DEBUG=1 DEBUG=1 python -m pytest -rA test/external/speed_v_theoretical.py --durations=20
|
||||
- name: Test tensor cores
|
||||
run: |
|
||||
AMD=1 AMD_LLVM=0 python3 test/test_linearizer.py TestLinearizer.test_tensor_cores TestLinearizer.test_tensor_cores_padded_amd TestLinearizer.test_tensor_cores_padded_uops
|
||||
AMD=1 python3 test/test_linearizer.py TestLinearizer.test_tensor_cores TestLinearizer.test_tensor_cores_padded_amd TestLinearizer.test_tensor_cores_padded_uops
|
||||
AMD=1 SHOULD_USE_TC=1 BFLOAT16=1 DEBUG=2 python3 extra/gemm/simple_matmul.py
|
||||
AMD=1 python3 test/test_linearizer.py TestLinearizer.test_tensor_cores TestLinearizer.test_tensor_cores_padded
|
||||
- name: Run Tensor Core GEMM (AMD)
|
||||
run: AMD=1 SHOULD_USE_TC=1 HALF=1 DEBUG=2 ATOL=2e-2 python3 extra/gemm/simple_matmul.py | tee matmul_amd.txt
|
||||
- name: Test AMD=1
|
||||
run: DEBUG=2 AMD=1 python -m pytest -rA test/test_tiny.py
|
||||
#- name: Test HIP=1
|
||||
# run: DEBUG=2 HIP=1 python -m pytest -rA test/test_tiny.py
|
||||
run: AMD=1 HALF=1 DEBUG=2 python3 extra/gemm/simple_matmul.py | tee matmul_amd.txt
|
||||
# TODO: AMD compiler bug causes this to fail
|
||||
#- name: Fuzz Padded Tensor Core GEMM
|
||||
# run: HSA=1 M_START=12 M_STOP=20 M_STEP=1 N_START=12 N_STOP=20 N_STEP=1 K_START=28 K_STOP=36 K_STEP=1 HALF=1 TC_OPT=2 DEBUG=2 python3 ./extra/gemm/fuzz_matmul.py
|
||||
#- name: Remove amdgpu
|
||||
# run: sleep 10 && sudo rmmod amdgpu # sleep a bit to let the driver unload the prev pid.
|
||||
- name: Test AM cold start time
|
||||
run: time AMD=1 AM_RESET=1 python3 test/test_tiny.py TestTiny.test_plus
|
||||
- name: Test AM warm start time
|
||||
run: time AMD=1 python3 test/test_tiny.py TestTiny.test_plus
|
||||
- name: Run Stable Diffusion
|
||||
run: BENCHMARK_LOG=stable_diffusion AMD=1 python3 examples/stable_diffusion.py --fp16 --seed 0 --noshow --timing | tee sd.txt
|
||||
run: AMD=1 python3 examples/stable_diffusion.py --seed 0 --noshow --timing | tee sd.txt
|
||||
- name: Run SDXL
|
||||
run: BENCHMARK_LOG=stable_diffusion_xl CAPTURE_PROCESS_REPLAY=0 AMD=1 python3 examples/sdxl.py --seed 0 --noshow --timing | tee sdxl.txt
|
||||
run: AMD=1 python3 examples/sdxl.py --seed 0 --noshow --timing | tee sdxl.txt
|
||||
- name: Run LLaMA 7B
|
||||
run: |
|
||||
BENCHMARK_LOG=llama_nojit AMD=1 JIT=0 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_unjitted.txt
|
||||
BENCHMARK_LOG=llama AMD=1 JIT=1 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_jitted.txt
|
||||
AMD=1 JIT=0 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_unjitted.txt
|
||||
AMD=1 JIT=1 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_jitted.txt
|
||||
- name: Run LLaMA 7B with BEAM
|
||||
run: BENCHMARK_LOG=llama_beam AMD=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_beam.txt
|
||||
# - name: Run LLaMA 7B on 4 GPUs
|
||||
# run: AMD=1 CAPTURE_PROCESS_REPLAY=0 python3 examples/llama.py --gen 1 --size 7B --shard 4 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_four_gpu.txt
|
||||
# - name: Run LLaMA 7B on 6 GPUs
|
||||
# run: AMD=1 CAPTURE_PROCESS_REPLAY=0 python3 examples/llama.py --gen 1 --size 7B --shard 6 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_six_gpu.txt
|
||||
run: AMD=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 python3 examples/llama.py --gen 1 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_beam.txt
|
||||
- name: Run LLaMA 7B on 4 GPUs
|
||||
run: AMD=1 python3 examples/llama.py --gen 1 --size 7B --shard 4 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_four_gpu.txt
|
||||
- name: Run LLaMA 7B on 6 GPUs
|
||||
run: AMD=1 python3 examples/llama.py --gen 1 --size 7B --shard 6 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_six_gpu.txt
|
||||
- name: Run LLaMA-3 8B BEAM
|
||||
run: BENCHMARK_LOG=llama3_beam AMD=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 python3 examples/llama3.py --size 8B --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_beam.txt
|
||||
- name: Run LLaMA-3 8B on 4 GPUs with BEAM
|
||||
run: BENCHMARK_LOG=llama3_beam_4gpu AMD=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 CAPTURE_PROCESS_REPLAY=0 python3 examples/llama3.py --size 8B --shard 4 --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_four_gpu.txt
|
||||
# - name: Run LLaMA-3 8B on 6 GPUs
|
||||
# run: AMD=1 CAPTURE_PROCESS_REPLAY=0 python3 examples/llama3.py --size 8B --shard 6 --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_six_gpu.txt
|
||||
#- name: Restore amdgpu
|
||||
# run: sudo modprobe amdgpu
|
||||
# - name: Run LLaMA-2 70B
|
||||
# run: AMD=1 CAPTURE_PROCESS_REPLAY=0 python3 examples/llama.py --gen 2 --size 70B --shard 6 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_2_70B.txt
|
||||
run: AMD=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 python3 examples/llama3.py --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_beam.txt
|
||||
- name: Run LLaMA-3 8B on 4 GPUs
|
||||
run: AMD=1 python3 examples/llama3.py --shard 4 --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_four_gpu.txt
|
||||
- name: Run LLaMA-3 8B on 6 GPUs
|
||||
run: AMD=1 python3 examples/llama3.py --shard 6 --model weights/LLaMA-3/8B-SF-DPO/ --benchmark --temperature 0 | tee llama3_six_gpu.txt
|
||||
- name: Run LLaMA-2 70B
|
||||
run: AMD=1 python3 examples/llama.py --gen 2 --size 70B --shard 6 --prompt "Hello." --count 10 --temperature 0 --timing | tee llama_2_70B.txt
|
||||
- name: Run Mixtral 8x7B
|
||||
run: time BENCHMARK_LOG=mixtral AMD=1 python3 examples/mixtral.py --temperature 0 --count 10 --timing | tee mixtral.txt
|
||||
run: time AMD=1 python3 examples/mixtral.py --temperature 0 --count 10 --timing | tee mixtral.txt
|
||||
- name: Run GPT2
|
||||
run: |
|
||||
BENCHMARK_LOG=gpt2_nojit AMD=1 JIT=0 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_unjitted.txt
|
||||
BENCHMARK_LOG=gpt2 AMD=1 JIT=1 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_jitted.txt
|
||||
AMD=1 JIT=0 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_unjitted.txt
|
||||
AMD=1 JIT=1 python3 examples/gpt2.py --prompt "Hello." --count 10 --temperature 0 --timing | tee gpt2_jitted.txt
|
||||
- name: Run GPT2 w HALF
|
||||
run: BENCHMARK_LOG=gpt2_half AMD=1 HALF=1 python3 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half.txt
|
||||
run: AMD=1 HALF=1 python3 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half.txt
|
||||
- name: Run GPT2 w HALF/BEAM
|
||||
run: BENCHMARK_LOG=gpt2_half_beam AMD=1 HALF=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 python3 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half_beam.txt
|
||||
run: AMD=1 HALF=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 CAST_BEFORE_VIEW=0 python3 examples/gpt2.py --count 10 --temperature 0 --timing | tee gpt2_half_beam.txt
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Speed (AMD)
|
||||
@@ -457,6 +384,8 @@ jobs:
|
||||
llama_unjitted.txt
|
||||
llama_jitted.txt
|
||||
llama_beam.txt
|
||||
llama_four_gpu.txt
|
||||
llama_six_gpu.txt
|
||||
llama3_beam.txt
|
||||
llama3_four_gpu.txt
|
||||
llama3_six_gpu.txt
|
||||
@@ -476,18 +405,13 @@ jobs:
|
||||
testmoreamdbenchmark:
|
||||
name: tinybox red Training Benchmark
|
||||
runs-on: [self-hosted, Linux, tinybox]
|
||||
timeout-minutes: 30
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -e -o pipefail {0}
|
||||
shell: bash -o pipefail {0}
|
||||
if: github.repository_owner == 'tinygrad'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
- name: Remove amdgpu
|
||||
run: sudo rmmod amdgpu || true
|
||||
- name: Cleanup running AM processes
|
||||
run: python extra/amdpci/am_smi.py --pids --kill
|
||||
- name: Symlink models and datasets
|
||||
run: |
|
||||
mkdir -p weights
|
||||
@@ -506,21 +430,25 @@ jobs:
|
||||
- name: reset process replay
|
||||
run: test/external/process_replay/reset.py
|
||||
- name: Train MNIST
|
||||
run: time PYTHONPATH=. AMD=1 TARGET_EVAL_ACC_PCT=96.0 python3 examples/beautiful_mnist.py | tee beautiful_mnist.txt
|
||||
run: time PYTHONPATH=. AMD=1 TARGET_EVAL_ACC_PCT=97.3 python3 examples/beautiful_mnist.py | tee beautiful_mnist.txt
|
||||
- name: Run 10 CIFAR training steps
|
||||
run: BENCHMARK_LOG=cifar_10steps AMD=1 STEPS=10 python3 examples/hlb_cifar10.py | tee train_cifar.txt
|
||||
run: AMD=1 STEPS=10 python3 examples/hlb_cifar10.py | tee train_cifar.txt
|
||||
- name: Run 10 CIFAR training steps w HALF
|
||||
run: BENCHMARK_LOG=cifar_10steps_half AMD=1 STEPS=10 DEFAULT_FLOAT=HALF python3 examples/hlb_cifar10.py | tee train_cifar_half.txt
|
||||
run: AMD=1 STEPS=10 DEFAULT_FLOAT=HALF python3 examples/hlb_cifar10.py | tee train_cifar_half.txt
|
||||
- name: Run 10 CIFAR training steps w BF16
|
||||
run: BENCHMARK_LOG=cifar_10steps_bf16 AMD=1 STEPS=10 DEFAULT_FLOAT=BFLOAT16 python3 examples/hlb_cifar10.py | tee train_cifar_bf16.txt
|
||||
run: AMD=1 STEPS=10 DEFAULT_FLOAT=BFLOAT16 python3 examples/hlb_cifar10.py | tee train_cifar_bf16.txt
|
||||
- name: Run 10 CIFAR training steps w winograd
|
||||
run: BENCHMARK_LOG=cifar_10steps_half_wino AMD=1 WINO=1 STEPS=10 DEFAULT_FLOAT=HALF python3 examples/hlb_cifar10.py | tee train_cifar_wino.txt
|
||||
run: AMD=1 WINO=1 STEPS=10 python3 examples/hlb_cifar10.py | tee train_cifar_wino.txt
|
||||
- name: Run full CIFAR training w 1 GPU
|
||||
run: time BENCHMARK_LOG=cifar AMD=1 DEFAULT_FLOAT=HALF LATEWINO=1 STEPS=1000 TARGET_EVAL_ACC_PCT=93.2 python3 examples/hlb_cifar10.py | tee train_cifar_one_gpu.txt
|
||||
run: time AMD=1 DEFAULT_FLOAT=HALF LATEWINO=1 STEPS=1000 TARGET_EVAL_ACC_PCT=93.2 python3 examples/hlb_cifar10.py | tee train_cifar_one_gpu.txt
|
||||
- name: Run full CIFAR training steps w 6 GPUS
|
||||
run: time BENCHMARK_LOG=cifar_6gpu AMD=1 DEFAULT_FLOAT=HALF STEPS=350 BS=1536 GPUS=6 TARGET_EVAL_ACC_PCT=93.2 python3 examples/hlb_cifar10.py | tee train_cifar_six_gpu.txt
|
||||
- name: Run full CIFAR training steps w 6 GPUS (REMOTE)
|
||||
run: time BENCHMARK_LOG=cifar_6gpu_remote REMOTE=1 REMOTEDEV=AMD DEFAULT_FLOAT=HALF STEPS=350 BS=1536 GPUS=6 TARGET_EVAL_ACC_PCT=93.2 python3 examples/hlb_cifar10.py | tee train_cifar_six_gpu_remote.txt
|
||||
run: time AMD=1 DEFAULT_FLOAT=HALF STEPS=350 BS=1536 GPUS=6 TARGET_EVAL_ACC_PCT=93.2 python3 examples/hlb_cifar10.py | tee train_cifar_six_gpu.txt
|
||||
- name: Run MLPerf resnet eval
|
||||
run: time AMD=1 MODEL=resnet python3 examples/mlperf/model_eval.py
|
||||
- name: Run 10 MLPerf ResNet50 training steps (1 gpu)
|
||||
run: AMD=1 DEFAULT_FLOAT=HALF BENCHMARK=10 BS=256 GPUS=1 MODEL=resnet python3 examples/mlperf/model_train.py | tee train_resnet_one_gpu.txt
|
||||
- name: Run 10 MLPerf ResNet50 training steps (6 gpu)
|
||||
run: AMD=1 DEFAULT_FLOAT=HALF BENCHMARK=10 BS=1536 GPUS=6 MODEL=resnet python3 examples/mlperf/model_train.py | tee train_resnet.txt
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Speed (AMD Training)
|
||||
@@ -531,69 +459,18 @@ jobs:
|
||||
train_cifar_bf16.txt
|
||||
train_cifar_wino.txt
|
||||
train_cifar_one_gpu.txt
|
||||
train_cifar_six_gpu.txt
|
||||
train_cifar_six_gpu_remote.txt
|
||||
- name: Run process replay tests
|
||||
run: cp test/external/process_replay/process_replay.py ./process_replay.py && git fetch origin master && git -c advice.detachedHead=false checkout origin/master && PYTHONPATH=. python3 process_replay.py
|
||||
|
||||
testmlperfamdbenchmark:
|
||||
name: tinybox red MLPerf Benchmark
|
||||
runs-on: [self-hosted, Linux, tinybox]
|
||||
timeout-minutes: 30
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -e -o pipefail {0}
|
||||
if: github.repository_owner == 'tinygrad'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
- name: Remove amdgpu
|
||||
run: sudo rmmod amdgpu || true
|
||||
- name: Cleanup running AM processes
|
||||
run: python extra/amdpci/am_smi.py --pids --kill
|
||||
- name: Symlink models and datasets
|
||||
run: |
|
||||
mkdir -p weights
|
||||
ln -s ~/tinygrad/weights/bpe_simple_vocab_16e6.txt.gz weights/bpe_simple_vocab_16e6.txt.gz
|
||||
ln -s ~/tinygrad/weights/LLaMA weights/LLaMA
|
||||
ln -s ~/tinygrad/extra/datasets/cifar-10-python.tar.gz extra/datasets/cifar-10-python.tar.gz
|
||||
ln -s /raid/weights/mixtral-8x7b-32kseqlen weights/mixtral-8x7b-32kseqlen
|
||||
ln -s /raid/weights/LLaMA-2 weights/LLaMA-2
|
||||
mkdir -p extra/datasets
|
||||
ln -s /raid/datasets/imagenet extra/datasets/imagenet
|
||||
- name: setup staging db
|
||||
if: github.ref == 'refs/heads/update_benchmark_staging'
|
||||
run: |
|
||||
echo "CACHEDB=/tmp/staging.db" >> $GITHUB_ENV
|
||||
rm -f /tmp/staging.db /tmp/staging.db-shm /tmp/staging.db-wal
|
||||
- name: reset process replay
|
||||
run: test/external/process_replay/reset.py
|
||||
- name: Run MLPerf resnet eval
|
||||
run: time BENCHMARK_LOG=resnet_eval AMD=1 MODEL=resnet python3 examples/mlperf/model_eval.py
|
||||
- name: Run 10 MLPerf ResNet50 training steps (1 gpu)
|
||||
run: BENCHMARK_LOG=resnet_10steps AMD=1 DEFAULT_FLOAT=HALF BENCHMARK=10 BS=256 GPUS=1 MODEL=resnet python3 examples/mlperf/model_train.py | tee train_resnet_one_gpu.txt
|
||||
- name: Run 10 MLPerf ResNet50 training steps (6 gpu)
|
||||
run: BENCHMARK_LOG=resnet_10steps_6gpu AMD=1 CAPTURE_PROCESS_REPLAY=0 DEFAULT_FLOAT=HALF BENCHMARK=10 BS=1536 GPUS=6 MODEL=resnet python3 examples/mlperf/model_train.py | tee train_resnet.txt
|
||||
- name: Run 10 MLPerf Bert training steps (6 gpu)
|
||||
# TODO: remove BERT_LAYERS once scheduler is fast
|
||||
run: BENCHMARK_LOG=bert_10steps_6gpu AMD=1 CAPTURE_PROCESS_REPLAY=0 DEFAULT_FLOAT=HALF BENCHMARK=10 BS=66 GPUS=6 BERT_LAYERS=2 FUSE_ARANGE=1 FUSE_ARANGE_UINT=0 MODEL=bert python3 examples/mlperf/model_train.py | tee train_bert.txt
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Speed (AMD MLPerf)
|
||||
path: |
|
||||
train_resnet.txt
|
||||
train_resnet_one_gpu.txt
|
||||
train_bert.txt
|
||||
train_cifar_six_gpu.txt
|
||||
- name: Run process replay tests
|
||||
run: cp test/external/process_replay/process_replay.py ./process_replay.py && git fetch origin master && git -c advice.detachedHead=false checkout origin/master && PYTHONPATH=. python3 process_replay.py
|
||||
|
||||
testqualcommbenchmark:
|
||||
name: comma Benchmark
|
||||
runs-on: [self-hosted, Linux, comma]
|
||||
timeout-minutes: 20
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -e -o pipefail {0}
|
||||
shell: bash -o pipefail {0}
|
||||
if: github.repository_owner == 'tinygrad'
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
@@ -605,26 +482,26 @@ jobs:
|
||||
rm -f /tmp/staging.db /tmp/staging.db-shm /tmp/staging.db-wal
|
||||
- name: reset process replay
|
||||
run: test/external/process_replay/reset.py
|
||||
- name: openpilot compile 0.9.4
|
||||
run: PYTHONPATH=. NOLOCALS=1 FLOAT16=1 IMAGE=2 QCOM=1 taskset -c 4-7 python examples/openpilot/compile2.py | tee openpilot_compile_0_9_4.txt
|
||||
- name: openpilot compile 0.9.7
|
||||
run: PYTHONPATH=. NOLOCALS=1 FLOAT16=1 IMAGE=2 QCOM=1 taskset -c 4-7 python examples/openpilot/compile2.py https://github.com/commaai/openpilot/raw/v0.9.7/selfdrive/modeld/models/supercombo.onnx | tee openpilot_compile_0_9_7.txt
|
||||
- name: validate openpilot 0.9.7
|
||||
run: PYTHONPATH=. FLOAT16=0 IMAGE=2 QCOM=1 taskset -c 4-7 python3 test/external/external_benchmark_openpilot.py https://github.com/commaai/openpilot/raw/v0.9.7/selfdrive/modeld/models/supercombo.onnx | tee openpilot_image_0_9_7.txt
|
||||
- name: benchmark openpilot 0.9.4
|
||||
run: PYTHONPATH=. QCOM=1 taskset -c 4-7 python3 test/external/external_benchmark_openpilot.py https://github.com/commaai/openpilot/raw/v0.9.4/selfdrive/modeld/models/supercombo.onnx | tee openpilot_0_9_4.txt
|
||||
- name: benchmark openpilot 0.9.7
|
||||
run: BENCHMARK_LOG=openpilot_0_9_7 PYTHONPATH=. QCOM=1 taskset -c 4-7 python3 test/external/external_benchmark_openpilot.py https://github.com/commaai/openpilot/raw/v0.9.7/selfdrive/modeld/models/supercombo.onnx | tee openpilot_0_9_7.txt
|
||||
run: PYTHONPATH=. QCOM=1 taskset -c 4-7 python3 test/external/external_benchmark_openpilot.py https://github.com/commaai/openpilot/raw/v0.9.7/selfdrive/modeld/models/supercombo.onnx | tee openpilot_0_9_7.txt
|
||||
- name: benchmark openpilot w IMAGE=2 0.9.4
|
||||
run: PYTHONPATH=. NOLOCALS=1 FLOAT16=1 IMAGE=2 QCOM=1 taskset -c 4-7 python3 test/external/external_benchmark_openpilot.py https://github.com/commaai/openpilot/raw/v0.9.4/selfdrive/modeld/models/supercombo.onnx | tee openpilot_image_0_9_4.txt
|
||||
- name: benchmark openpilot w IMAGE=2 0.9.7
|
||||
run: BENCHMARK_LOG=openpilot_0_9_7_image PYTHONPATH=. NOLOCALS=1 FLOAT16=1 IMAGE=2 QCOM=1 taskset -c 4-7 python3 test/external/external_benchmark_openpilot.py https://github.com/commaai/openpilot/raw/v0.9.7/selfdrive/modeld/models/supercombo.onnx | tee openpilot_image_0_9_7.txt
|
||||
run: PYTHONPATH=. NOLOCALS=1 FLOAT16=1 IMAGE=2 QCOM=1 taskset -c 4-7 python3 test/external/external_benchmark_openpilot.py https://github.com/commaai/openpilot/raw/v0.9.7/selfdrive/modeld/models/supercombo.onnx | tee openpilot_image_0_9_7.txt
|
||||
- name: openpilot compile3 0.9.7
|
||||
run: PYTHONPATH="." QCOM=1 taskset -c 4-7 python3 examples/openpilot/compile3.py https://github.com/commaai/openpilot/raw/v0.9.7/selfdrive/modeld/models/supercombo.onnx
|
||||
- name: openpilot compile3 0.9.7+ tomb raider
|
||||
run: PYTHONPATH="." QCOM=1 taskset -c 4-7 python3 examples/openpilot/compile3.py https://github.com/commaai/openpilot/raw/e8bea2c78ffa92685ece511e9b554122aaf1a79d/selfdrive/modeld/models/supercombo.onnx
|
||||
- name: openpilot dmonitoring compile3 0.9.7
|
||||
run: PYTHONPATH="." QCOM=1 taskset -c 4-7 python3 examples/openpilot/compile3.py https://github.com/commaai/openpilot/raw/v0.9.7/selfdrive/modeld/models/dmonitoring_model.onnx
|
||||
- name: benchmark MobileNetV2 on DSP
|
||||
run: |
|
||||
# generate quantized weights
|
||||
ln -s /data/home/tiny/tinygrad/extra/datasets/imagenet extra/datasets/imagenet
|
||||
ln -s /data/home/tiny/tinygrad/testsig-*.so .
|
||||
PYTHONPATH=. CC=clang-19 CPU=1 QUANT=1 CNT=0 python3 examples/test_onnx_imagenet.py https://github.com/xamcat/mobcat-samples/raw/refs/heads/master/onnx_runtime/InferencingSample/InferencingSample/mobilenetv2-7.onnx /tmp/model.quant.onnx
|
||||
# benchmark on DSP with NOOPT=1, the devectorizer has issues
|
||||
PYTHONPATH=. CC=clang-19 DSP=1 DONT_REALIZE_EXPAND=1 NOOPT=1 CNT=2 DEBUG=2 python3 examples/test_onnx_imagenet.py /tmp/model.quant.onnx
|
||||
- name: Run process replay tests
|
||||
run: cp test/external/process_replay/process_replay.py ./process_replay.py && git fetch origin master && git -c advice.detachedHead=false checkout origin/master && PYTHONPATH=. python3 process_replay.py
|
||||
- uses: actions/upload-artifact@v4
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
name: Benchmark with kernel search
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- update_benchmark_search
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
run_script_job:
|
||||
runs-on: [self-hosted, Linux, tinybox]
|
||||
if: github.repository_owner == 'tinygrad'
|
||||
timeout-minutes: 100
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
- name: Remove amdgpu
|
||||
run: sudo rmmod amdgpu || true
|
||||
- name: Cleanup running AM processes
|
||||
run: python extra/amdpci/am_smi.py --pids --kill
|
||||
- name: Run SDXL with new search
|
||||
# TODO: GCVM_L2_PROTECTION_FAULT_STATUS with llvm19
|
||||
run: |
|
||||
BENCHMARK_LOG=search_sdxl PYTHONPATH=. AMD=1 JITBEAM=2 IGNORE_BEAM_CACHE=1 DISABLE_COMPILER_CACHE=1 python examples/sdxl.py --noshow --timing --seed 0
|
||||
- name: Run SDXL with cached search
|
||||
run: |
|
||||
BENCHMARK_LOG=search_sdxl_cached PYTHONPATH=. AMD=1 JITBEAM=2 python examples/sdxl.py --noshow --timing --seed 0
|
||||
- name: Run winograd cifar with new search
|
||||
run: |
|
||||
BENCHMARK_LOG=search_wino_cifar WINO=1 DEFAULT_FLOAT=HALF JITBEAM=4 IGNORE_BEAM_CACHE=1 DISABLE_COMPILER_CACHE=1 BS=1024 STEPS=500 python examples/hlb_cifar10.py
|
||||
- name: Run winograd cifar with cached search
|
||||
run: |
|
||||
BENCHMARK_LOG=search_wino_cifar_cached WINO=1 DEFAULT_FLOAT=HALF JITBEAM=4 BS=1024 STEPS=500 python examples/hlb_cifar10.py
|
||||
@@ -1,30 +0,0 @@
|
||||
name: Run MLPerf Training
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '5 8 * * *' # Runs at 08:05 UTC (12:05 AM Pacific Time)
|
||||
push:
|
||||
branches:
|
||||
- update_mlperf
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
run_script_job:
|
||||
runs-on: [self-hosted, Linux, tinybox]
|
||||
if: github.repository_owner == 'tinygrad'
|
||||
timeout-minutes: 240
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
- name: Cleanup running AM processes
|
||||
run: python extra/amdpci/am_smi.py --pids --kill
|
||||
- name: Symlink datasets
|
||||
run: |
|
||||
mkdir -p extra/datasets
|
||||
ln -s /raid/datasets/imagenet extra/datasets/imagenet
|
||||
- name: Run resnet
|
||||
run: |
|
||||
rm "~/.cache/tinygrad/cache_mlperf.db" || true
|
||||
BENCHMARK_LOG=mlpert_train_resnet LOGMLPERF=0 CACHEDB="~/.cache/tinygrad/cache_mlperf.db" examples/mlperf/training_submission_v5.1/tinycorp/benchmarks/resnet/implementations/tinybox_red/run_and_time.sh
|
||||
rm "~/.cache/tinygrad/cache_mlperf.db"
|
||||
+480
-937
File diff suppressed because it is too large
Load Diff
+1
-7
@@ -10,7 +10,6 @@ notebooks
|
||||
*.so
|
||||
*.txt
|
||||
build
|
||||
!examples/tinychat/assets/cdn.jsdelivr.net/npm/[email protected]/build/
|
||||
/dist
|
||||
*.egg-info
|
||||
/env
|
||||
@@ -34,8 +33,6 @@ extra/datasets/open-images-v6-mlperf
|
||||
extra/datasets/kits/
|
||||
extra/datasets/COCO/
|
||||
extra/datasets/audio*
|
||||
extra/huggingface_onnx/models/*
|
||||
extra/huggingface_onnx/*.yaml
|
||||
extra/weights
|
||||
venv
|
||||
examples/**/net.*[js,json]
|
||||
@@ -58,7 +55,4 @@ weights
|
||||
comgr_*
|
||||
*.pkl
|
||||
site/
|
||||
profile_stats
|
||||
*.log
|
||||
target
|
||||
.mypy_cache
|
||||
master_schedule.py
|
||||
|
||||
+16
-11
@@ -1,34 +1,39 @@
|
||||
# on Windows -- $env:SKIP="tests,example"
|
||||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: ruff
|
||||
name: ruff
|
||||
entry: python3 -m ruff check .
|
||||
- id: whitespace
|
||||
name: strip whitespace
|
||||
entry: find tinygrad -type f -name "*.py" -exec sed -i '' 's/ *$//' '{}' ';'
|
||||
language: system
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
- id: tiny
|
||||
name: tiny tests
|
||||
entry: python3 -m pytest test/test_tiny.py
|
||||
- id: ruff
|
||||
name: ruff
|
||||
entry: ruff check .
|
||||
language: system
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
- id: mypy
|
||||
name: mypy
|
||||
entry: python3 -m mypy tinygrad/ --strict-equality
|
||||
entry: mypy tinygrad/ --strict-equality
|
||||
language: system
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
- id: docs2
|
||||
name: docs2
|
||||
entry: python3 docs/abstractions2.py
|
||||
language: system
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
- id: devicetests
|
||||
name: select GPU tests
|
||||
entry: env GPU=1 PYTHONPATH="." python3 -m pytest test/test_uops.py test/test_search.py
|
||||
entry: env GPU=1 PYTHONPATH="." pytest test/test_uops.py test/test_search.py
|
||||
language: system
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
- id: tests
|
||||
name: subset of tests
|
||||
entry: env PYTHONPATH="." python3 -m pytest -n=4 test/test_ops.py test/test_dtype.py test/test_schedule.py test/test_assign.py
|
||||
entry: env PYTHONPATH="." python3 -m pytest -n=4 test/unit/ test/test_ops.py test/test_dtype.py test/test_schedule.py test/test_assign.py test/test_symbolic_shapetracker.py
|
||||
language: system
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
@@ -40,7 +45,7 @@ repos:
|
||||
pass_filenames: false
|
||||
- id: pylint
|
||||
name: pylint
|
||||
entry: python3 -m pylint tinygrad/
|
||||
entry: env PYTHONPATH="." python3 -m pylint tinygrad/
|
||||
language: system
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
@@ -7,7 +7,7 @@ extension-pkg-whitelist=scipy,cereal.messaging.messaging_pyx,PyQt5,av
|
||||
|
||||
# Add files or directories to the blacklist. They should be base names, not
|
||||
# paths.
|
||||
ignore=CVS,autogen,msm_kgsl.py,runtime,.venv
|
||||
ignore=CVS,autogen,msm_kgsl.py
|
||||
|
||||
# Add files or directories matching the regex patterns to the blacklist. The
|
||||
# regex matches against base names, not paths.
|
||||
@@ -54,7 +54,7 @@ confidence=
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||
# --disable=W"
|
||||
disable=C,R,W0613,W0511,W0212,W0201,W0106,W0603,W0621,W0703,W1201,W1203,E1136,W1514,E1101,W0221,W0105,E0401,abstract-method
|
||||
disable=C,R,W0613,W0511,W0212,W0201,W0106,W0603,W0621,W0703,W1201,W1203,E1136,W1514,E1101,W0221,W0105,E0401
|
||||
# E1101 for function binding
|
||||
# W0221 for Function class
|
||||
# W0105 for comment strings
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# tinygrad agents
|
||||
|
||||
Hello agent. You are one of the most talented programmers of your generation.
|
||||
|
||||
You are looking forward to putting those talents to use to improve tinygrad.
|
||||
|
||||
## philosophy
|
||||
|
||||
tinygrad is a **tensor** library focused on beauty and minimalism, while still matching the functionality of PyTorch and JAX.
|
||||
|
||||
Every line must earn its keep. Prefer readability over cleverness. We believe that if carefully designed, 10 lines can have the impact of 1000.
|
||||
|
||||
Never mix functionality changes with whitespace changes. All functionality changes must be tested.
|
||||
|
||||
## style
|
||||
|
||||
Use **2-space indentation**, and keep lines to a maximum of **150 characters**. Match the existing style.
|
||||
@@ -21,11 +21,11 @@ tinygrad: For something between [PyTorch](https://github.com/pytorch/pytorch) an
|
||||
|
||||
---
|
||||
|
||||
Despite tinygrad's size, it is a fully featured deep learning framework.
|
||||
This may not be the best deep learning framework, but it is a deep learning framework.
|
||||
|
||||
Due to its extreme simplicity, it is the easiest framework to add new accelerators to, with support for both inference and training. If XLA is CISC, tinygrad is RISC.
|
||||
Due to its extreme simplicity, it aims to be the easiest framework to add new accelerators to, with support for both inference and training. If XLA is CISC, tinygrad is RISC.
|
||||
|
||||
tinygrad is now beta software, we [raised some money](https://geohot.github.io/blog/jekyll/update/2023/05/24/the-tiny-corp-raised-5M.html) to make it good. Someday, we will tape out chips.
|
||||
tinygrad is still alpha software, but we [raised some money](https://geohot.github.io/blog/jekyll/update/2023/05/24/the-tiny-corp-raised-5M.html) to make it good. Someday, we will tape out chips.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -39,8 +39,9 @@ Try a matmul. See how, despite the style, it is fused into one kernel with the p
|
||||
|
||||
```sh
|
||||
DEBUG=3 python3 -c "from tinygrad import Tensor;
|
||||
N = 1024; a, b = Tensor.empty(N, N), Tensor.empty(N, N);
|
||||
(a.reshape(N, 1, N) * b.T.reshape(1, N, N)).sum(axis=2).realize()"
|
||||
N = 1024; a, b = Tensor.rand(N, N), Tensor.rand(N, N);
|
||||
c = (a.reshape(N, 1, N) * b.T.reshape(1, N, N)).sum(axis=2);
|
||||
print((c.numpy() - (a.numpy() @ b.numpy())).mean())"
|
||||
```
|
||||
|
||||
And we can change `DEBUG` to `4` to see the generated code.
|
||||
@@ -80,14 +81,13 @@ See [examples/beautiful_mnist.py](examples/beautiful_mnist.py) for the full vers
|
||||
tinygrad already supports numerous accelerators, including:
|
||||
|
||||
- [x] [GPU (OpenCL)](tinygrad/runtime/ops_gpu.py)
|
||||
- [x] [CPU (C Code)](tinygrad/runtime/ops_cpu.py)
|
||||
- [x] [CLANG (C Code)](tinygrad/runtime/ops_clang.py)
|
||||
- [x] [LLVM](tinygrad/runtime/ops_llvm.py)
|
||||
- [x] [METAL](tinygrad/runtime/ops_metal.py)
|
||||
- [x] [CUDA](tinygrad/runtime/ops_cuda.py)
|
||||
- [x] [AMD](tinygrad/runtime/ops_amd.py)
|
||||
- [x] [NV](tinygrad/runtime/ops_nv.py)
|
||||
- [x] [QCOM](tinygrad/runtime/ops_qcom.py)
|
||||
- [x] [WEBGPU](tinygrad/runtime/ops_webgpu.py)
|
||||
|
||||
And it is easy to add more! Your accelerator of choice only needs to support a total of ~25 low level ops.
|
||||
|
||||
@@ -125,8 +125,8 @@ y = Tensor([[2.0,0,-2.0]], requires_grad=True)
|
||||
z = y.matmul(x).sum()
|
||||
z.backward()
|
||||
|
||||
print(x.grad.tolist()) # dz/dx
|
||||
print(y.grad.tolist()) # dz/dy
|
||||
print(x.grad.numpy()) # dz/dx
|
||||
print(y.grad.numpy()) # dz/dy
|
||||
```
|
||||
|
||||
The same thing but in PyTorch:
|
||||
@@ -138,8 +138,8 @@ y = torch.tensor([[2.0,0,-2.0]], requires_grad=True)
|
||||
z = y.matmul(x).sum()
|
||||
z.backward()
|
||||
|
||||
print(x.grad.tolist()) # dz/dx
|
||||
print(y.grad.tolist()) # dz/dy
|
||||
print(x.grad.numpy()) # dz/dx
|
||||
print(y.grad.numpy()) # dz/dy
|
||||
```
|
||||
|
||||
## Contributing
|
||||
@@ -150,7 +150,7 @@ We'll start with what will get your PR closed with a pointer to this section:
|
||||
|
||||
- No code golf! While low line count is a guiding light of this project, anything that remotely looks like code golf will be closed. The true goal is reducing complexity and increasing readability, and deleting `\n`s does nothing to help with that.
|
||||
- All docs and whitespace changes will be closed unless you are a well-known contributor. The people writing the docs should be those who know the codebase the absolute best. People who have not demonstrated that shouldn't be messing with docs. Whitespace changes are both useless *and* carry a risk of introducing bugs.
|
||||
- Anything you claim is a "speedup" must be benchmarked. In general, the goal is simplicity, so even if your PR makes things marginally faster, you have to consider the tradeoff with maintainability and readability.
|
||||
- Anything you claim is a "speedup" must be benchmarked. In general, the goal is simplicity, so even if your PR makes things marginally faster, you have to consider the tradeoff with maintainablity and readablity.
|
||||
- In general, the code outside the core `tinygrad/` folder is not well tested, so unless the current code there is broken, you shouldn't be changing it.
|
||||
- If your PR looks "complex", is a big diff, or adds lots of lines, it won't be reviewed or merged. Consider breaking it up into smaller PRs that are individually clear wins. A common pattern I see is prerequisite refactors before adding new functionality. If you can (cleanly) refactor to the point that the feature is a 3 line change, this is great, and something easy for us to review.
|
||||
|
||||
@@ -178,4 +178,4 @@ python3 -m pytest test/ # whole test suite
|
||||
|
||||
#### Process replay tests
|
||||
|
||||
[Process replay](https://github.com/tinygrad/tinygrad/blob/master/test/external/process_replay/README.md) compares your PR's generated kernels against master. If your PR is a refactor or speedup without any expected behavior change, It should include [pr] in the pull request title.
|
||||
[Process replay](https://github.com/tinygrad/tinygrad/blob/master/test/external/process_replay/process_replay.py) compares your PR's generated kernels against master. If your PR is a refactor or speedup without any expected behavior change, It should include [pr] in the pull request title, [example](https://github.com/tinygrad/tinygrad/pull/4995). Note that you should keep your branch up-to-date with master.
|
||||
|
||||
+12
-244
@@ -9,7 +9,7 @@ if [[ ! $(clang2py -V) ]]; then
|
||||
pip install clang==14.0.6
|
||||
git clone https://github.com/nimlgen/ctypeslib.git
|
||||
cd ctypeslib
|
||||
pip install .
|
||||
pip install --user .
|
||||
clang2py -V
|
||||
popd
|
||||
fi
|
||||
@@ -35,7 +35,7 @@ def _try_dlopen_$name():
|
||||
for candidate in PATHS_TO_TRY:
|
||||
try: return ctypes.CDLL(candidate)
|
||||
except OSError: pass
|
||||
return None
|
||||
raise RuntimeError("library $name not found")
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ generate_comgr() {
|
||||
--clang-args="-D__HIP_PLATFORM_AMD__ -I/opt/rocm/include -x c++" -o $BASE/comgr.py -l /opt/rocm/lib/libamd_comgr.so
|
||||
fixup $BASE/comgr.py
|
||||
sed -i "s\import ctypes\import ctypes, ctypes.util, os\g" $BASE/comgr.py
|
||||
patch_dlopen $BASE/comgr.py amd_comgr "'/opt/rocm/lib/libamd_comgr.so'" "os.getenv('ROCM_PATH', '')+'/lib/libamd_comgr.so'" "'/usr/local/lib/libamd_comgr.dylib'" "'/opt/homebrew/lib/libamd_comgr.dylib'"
|
||||
patch_dlopen $BASE/comgr.py amd_comgr "'/opt/rocm/lib/libamd_comgr.so'" "os.getenv('ROCM_PATH', '')+'/lib/libamd_comgr.so'"
|
||||
sed -i "s\ctypes.CDLL('/opt/rocm/lib/libamd_comgr.so')\_try_dlopen_amd_comgr()\g" $BASE/comgr.py
|
||||
python3 -c "import tinygrad.runtime.autogen.comgr"
|
||||
}
|
||||
@@ -78,17 +78,12 @@ generate_kfd() {
|
||||
clang2py /usr/include/linux/kfd_ioctl.h -o $BASE/kfd.py -k cdefstum
|
||||
|
||||
fixup $BASE/kfd.py
|
||||
sed -i "s/import ctypes/import ctypes, os/g" $BASE/kfd.py
|
||||
sed -i "s/import fcntl, functools/import functools/g" $BASE/kfd.py
|
||||
sed -i "/import functools/a from tinygrad.runtime.support.hcq import FileIOInterface" $BASE/kfd.py
|
||||
sed -i "s/def _do_ioctl(__idir, __base, __nr, __user_struct, __fd, \*\*kwargs):/def _do_ioctl(__idir, __base, __nr, __user_struct, __fd:FileIOInterface, \*\*kwargs):/g" $BASE/kfd.py
|
||||
sed -i "s/fcntl.ioctl(__fd, (__idir<<30)/__fd.ioctl((__idir<<30)/g" $BASE/kfd.py
|
||||
sed -i "s/!!/not not /g" $BASE/kfd.py
|
||||
sed -i "s\import ctypes\import ctypes, os\g" $BASE/kfd.py
|
||||
python3 -c "import tinygrad.runtime.autogen.kfd"
|
||||
}
|
||||
|
||||
generate_cuda() {
|
||||
clang2py /usr/include/cuda.h --clang-args="-D__CUDA_API_VERSION_INTERNAL" -o $BASE/cuda.py -l /usr/lib/x86_64-linux-gnu/libcuda.so
|
||||
clang2py /usr/include/cuda.h -o $BASE/cuda.py -l /usr/lib/x86_64-linux-gnu/libcuda.so
|
||||
sed -i "s\import ctypes\import ctypes, ctypes.util\g" $BASE/cuda.py
|
||||
sed -i "s\ctypes.CDLL('/usr/lib/x86_64-linux-gnu/libcuda.so')\ctypes.CDLL(ctypes.util.find_library('cuda'))\g" $BASE/cuda.py
|
||||
fixup $BASE/cuda.py
|
||||
@@ -105,10 +100,10 @@ generate_nvrtc() {
|
||||
}
|
||||
|
||||
generate_nv() {
|
||||
NVKERN_COMMIT_HASH=81fe4fb417c8ac3b9bdcc1d56827d116743892a5
|
||||
NVKERN_COMMIT_HASH=d6b75a34094b0f56c2ccadf14e5d0bd515ed1ab6
|
||||
NVKERN_SRC=/tmp/open-gpu-kernel-modules-$NVKERN_COMMIT_HASH
|
||||
if [ ! -d "$NVKERN_SRC" ]; then
|
||||
git clone https://github.com/NVIDIA/open-gpu-kernel-modules $NVKERN_SRC
|
||||
git clone https://github.com/tinygrad/open-gpu-kernel-modules $NVKERN_SRC
|
||||
pushd .
|
||||
cd $NVKERN_SRC
|
||||
git reset --hard $NVKERN_COMMIT_HASH
|
||||
@@ -117,24 +112,16 @@ generate_nv() {
|
||||
|
||||
clang2py -k cdefstum \
|
||||
extra/nv_gpu_driver/clc6c0qmd.h \
|
||||
extra/nv_gpu_driver/clcec0qmd.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/cl0000.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/cl0080.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/cl2080.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/cl2080_notification.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/clc56f.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/clc86f.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/clc96f.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/clc761.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/cl83de.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/clc56f.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/clc56f.h \
|
||||
$NVKERN_SRC/src/nvidia/generated/g_allclasses.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/clc6c0.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/class/clcdc0.h \
|
||||
$NVKERN_SRC/kernel-open/nvidia-uvm/clc6b5.h \
|
||||
$NVKERN_SRC/kernel-open/nvidia-uvm/clc9b5.h \
|
||||
$NVKERN_SRC/kernel-open/nvidia-uvm/uvm_ioctl.h \
|
||||
$NVKERN_SRC/kernel-open/nvidia-uvm/uvm_linux_ioctl.h \
|
||||
$NVKERN_SRC/kernel-open/nvidia-uvm/hwref/ampere/ga100/dev_fault.h \
|
||||
$NVKERN_SRC/src/nvidia/arch/nvalloc/unix/include/nv_escape.h \
|
||||
$NVKERN_SRC/src/nvidia/arch/nvalloc/unix/include/nv-ioctl.h \
|
||||
$NVKERN_SRC/src/nvidia/arch/nvalloc/unix/include/nv-ioctl-numbers.h \
|
||||
@@ -149,7 +136,6 @@ generate_nv() {
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/ctrl/ctrlc36f.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/ctrl/ctrlcb33.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/ctrl/ctrla06c.h \
|
||||
$NVKERN_SRC/src/common/sdk/nvidia/inc/ctrl/ctrl90f1.h \
|
||||
--clang-args="-include $NVKERN_SRC/src/common/sdk/nvidia/inc/nvtypes.h -I$NVKERN_SRC/src/common/inc -I$NVKERN_SRC/kernel-open/nvidia-uvm -I$NVKERN_SRC/kernel-open/common/inc -I$NVKERN_SRC/src/common/sdk/nvidia/inc -I$NVKERN_SRC/src/nvidia/arch/nvalloc/unix/include -I$NVKERN_SRC/src/common/sdk/nvidia/inc/ctrl" \
|
||||
-o $BASE/nv_gpu.py
|
||||
fixup $BASE/nv_gpu.py
|
||||
@@ -157,8 +143,6 @@ generate_nv() {
|
||||
sed -i "s\import ctypes\import ctypes, os\g" $BASE/nv_gpu.py
|
||||
sed -i 's/#\?\s\([A-Za-z0-9_]\+\) = MW ( \([0-9]\+\) : \([0-9]\+\) )/\1 = (\2 , \3)/' $BASE/nv_gpu.py # NVC6C0_QMDV03_00 processing
|
||||
sed -i 's/#\sdef NVC6C0_QMD\([A-Za-z0-9_()]\+\):/def NVC6C0_QMD\1:/' $BASE/nv_gpu.py
|
||||
sed -i 's/#\sdef NVCEC0_QMD\([A-Za-z0-9_()]\+\):/def NVCEC0_QMD\1:/' $BASE/nv_gpu.py
|
||||
sed -E -i -n '/^def (NVCEC0_QMDV05_00_RELEASE)(_ENABLE)\(i\):/{p;s//\1'"0"'\2=\1\2(0)\n\1'"1"'\2=\1\2(1)/;H;b};p;${x;s/^\n//;p}' "$BASE/nv_gpu.py"
|
||||
sed -i 's/#\s*return MW(\([0-9i()*+]\+\):\([0-9i()*+]\+\))/ return (\1 , \2)/' $BASE/nv_gpu.py
|
||||
sed -i 's/#\?\s*\(.*\)\s*=\s*\(NV\)\?BIT\(32\)\?\s*(\s*\([0-9]\+\)\s*)/\1 = (1 << \4)/' $BASE/nv_gpu.py # name = BIT(x) -> name = (1 << x)
|
||||
sed -i "s/UVM_\([A-Za-z0-9_]\+\) = \['i', '(', '\([0-9]\+\)', ')'\]/UVM_\1 = \2/" $BASE/nv_gpu.py # UVM_name = ['i', '(', '<num>', ')'] -> UVM_name = <num>
|
||||
@@ -167,30 +151,8 @@ generate_nv() {
|
||||
sed -n '1i\
|
||||
nv_status_codes = {}
|
||||
/^NV_STATUS_CODE/ { s/^NV_STATUS_CODE(\([^,]*\), *\([^,]*\), *"\([^"]*\)") *.*$/\1 = \2\nnv_status_codes[\1] = "\3"/; p }' $NVKERN_SRC/src/common/sdk/nvidia/inc/nvstatuscodes.h >> $BASE/nv_gpu.py
|
||||
|
||||
python3 -c "import tinygrad.runtime.autogen.nv_gpu"
|
||||
|
||||
clang2py -k cdefstum \
|
||||
$NVKERN_SRC/src/nvidia/inc/kernel/gpu/fsp/kern_fsp_cot_payload.h \
|
||||
$NVKERN_SRC/src/nvidia/arch/nvalloc/common/inc/gsp/gspifpub.h \
|
||||
$NVKERN_SRC/src/nvidia/arch/nvalloc/common/inc/gsp/gsp_fw_wpr_meta.h \
|
||||
$NVKERN_SRC/src/nvidia/arch/nvalloc/common/inc/gsp/gsp_fw_sr_meta.h \
|
||||
$NVKERN_SRC/src/nvidia/inc/kernel/gpu/gsp/gsp_init_args.h \
|
||||
$NVKERN_SRC/src/nvidia/inc/kernel/gpu/gsp/gsp_init_args.h \
|
||||
$NVKERN_SRC/src/common/uproc/os/common/include/libos_init_args.h \
|
||||
$NVKERN_SRC/src/nvidia/arch/nvalloc/common/inc/rmRiscvUcode.h \
|
||||
$NVKERN_SRC/src/common/shared/msgq/inc/msgq/msgq_priv.h \
|
||||
$NVKERN_SRC/src/nvidia/inc/kernel/vgpu/rpc_headers.h \
|
||||
$NVKERN_SRC/src/nvidia/inc/kernel/vgpu/rpc_global_enums.h \
|
||||
$NVKERN_SRC/src/nvidia/generated/g_rpc-structures.h \
|
||||
$NVKERN_SRC/src/nvidia/arch/nvalloc/common/inc/fsp/fsp_nvdm_format.h \
|
||||
extra/nv_gpu_driver/g_rpc-message-header.h \
|
||||
extra/nv_gpu_driver/gsp_static_config.h \
|
||||
extra/nv_gpu_driver/vbios.h \
|
||||
--clang-args="-DRPC_MESSAGE_STRUCTURES -DRPC_STRUCTURES -include $NVKERN_SRC/src/common/sdk/nvidia/inc/nvtypes.h -I$NVKERN_SRC/src/nvidia/generated -I$NVKERN_SRC/src/common/inc -I$NVKERN_SRC/src/nvidia/inc -I$NVKERN_SRC/src/nvidia/interface/ -I$NVKERN_SRC/src/nvidia/inc/kernel -I$NVKERN_SRC/src/nvidia/inc/libraries -I$NVKERN_SRC/src/nvidia/arch/nvalloc/common/inc -I$NVKERN_SRC/kernel-open/nvidia-uvm -I$NVKERN_SRC/kernel-open/common/inc -I$NVKERN_SRC/src/common/sdk/nvidia/inc -I$NVKERN_SRC/src/nvidia/arch/nvalloc/unix/include -I$NVKERN_SRC/src/common/sdk/nvidia/inc/ctrl" \
|
||||
-o $BASE/nv/nv.py
|
||||
|
||||
fixup $BASE/nv/nv.py
|
||||
python3 -c "import tinygrad.runtime.autogen.nv.nv"
|
||||
}
|
||||
|
||||
generate_amd() {
|
||||
@@ -198,12 +160,9 @@ generate_amd() {
|
||||
clang2py -k cdefstum \
|
||||
extra/hip_gpu_driver/sdma_registers.h \
|
||||
extra/hip_gpu_driver/nvd.h \
|
||||
extra/hip_gpu_driver/kfd_pm4_headers_ai.h \
|
||||
extra/hip_gpu_driver/soc21_enum.h \
|
||||
extra/hip_gpu_driver/sdma_v6_0_0_pkt_open.h \
|
||||
extra/hip_gpu_driver/gc_11_0_0_offset.h \
|
||||
extra/hip_gpu_driver/gc_10_3_0_offset.h \
|
||||
extra/hip_gpu_driver/sienna_cichlid_ip_offset.h \
|
||||
--clang-args="-I/opt/rocm/include -x c++" \
|
||||
-o $BASE/amd_gpu.py
|
||||
|
||||
@@ -240,62 +199,26 @@ generate_io_uring() {
|
||||
fixup $BASE/io_uring.py
|
||||
}
|
||||
|
||||
generate_ib() {
|
||||
clang2py -k cdefstum \
|
||||
/usr/include/infiniband/verbs.h \
|
||||
/usr/include/infiniband/verbs_api.h \
|
||||
/usr/include/infiniband/ib_user_ioctl_verbs.h \
|
||||
/usr/include/rdma/ib_user_verbs.h \
|
||||
-o $BASE/ib.py
|
||||
|
||||
sed -i "s\import ctypes\import ctypes, ctypes.util\g" "$BASE/ib.py"
|
||||
sed -i "s\FIXME_STUB\libibverbs\g" "$BASE/ib.py"
|
||||
sed -i "s\FunctionFactoryStub()\ctypes.CDLL(ctypes.util.find_library('ibverbs'), use_errno=True)\g" "$BASE/ib.py"
|
||||
|
||||
fixup $BASE/ib.py
|
||||
}
|
||||
|
||||
generate_libc() {
|
||||
clang2py -k cdefstum \
|
||||
$(dpkg -L libc6-dev | grep sys/mman.h) \
|
||||
$(dpkg -L libc6-dev | grep sys/syscall.h) \
|
||||
/usr/include/string.h \
|
||||
/usr/include/elf.h \
|
||||
/usr/include/unistd.h \
|
||||
/usr/include/asm-generic/mman-common.h \
|
||||
-o $BASE/libc.py
|
||||
|
||||
sed -i "s\import ctypes\import ctypes, ctypes.util, os\g" $BASE/libc.py
|
||||
sed -i "s\FIXME_STUB\libc\g" $BASE/libc.py
|
||||
sed -i "s\FunctionFactoryStub()\None if (libc_path := ctypes.util.find_library('c')) is None else ctypes.CDLL(libc_path, use_errno=True)\g" $BASE/libc.py
|
||||
sed -i "s\FunctionFactoryStub()\ctypes.CDLL(ctypes.util.find_library('c'))\g" $BASE/libc.py
|
||||
|
||||
fixup $BASE/libc.py
|
||||
}
|
||||
|
||||
generate_llvm() {
|
||||
INC="$(llvm-config-14 --includedir)"
|
||||
clang2py -k cdefstum \
|
||||
$(find "$INC/llvm-c/" -type f -name '*.h' | sort) \
|
||||
"$INC/llvm/Config/Targets.def" \
|
||||
"$INC/llvm/Config/AsmPrinters.def" \
|
||||
"$INC/llvm/Config/AsmParsers.def" \
|
||||
"$INC/llvm/Config/Disassemblers.def" \
|
||||
--clang-args="$(llvm-config-14 --cflags)" \
|
||||
-o "$BASE/llvm.py"
|
||||
|
||||
sed -i "s\import ctypes\import ctypes, tinygrad.runtime.support.llvm as llvm_support\g" "$BASE/llvm.py"
|
||||
sed -i "s\FIXME_STUB\llvm\g" "$BASE/llvm.py"
|
||||
sed -i "s\FunctionFactoryStub()\ctypes.CDLL(llvm_support.LLVM_PATH)\g" "$BASE/llvm.py"
|
||||
|
||||
fixup "$BASE/llvm.py"
|
||||
}
|
||||
|
||||
generate_kgsl() {
|
||||
clang2py extra/qcom_gpu_driver/msm_kgsl.h -o $BASE/kgsl.py -k cdefstum
|
||||
fixup $BASE/kgsl.py
|
||||
sed -i "s\import ctypes\import ctypes, os\g" $BASE/kgsl.py
|
||||
sed -nE 's/#define ([A-Za-z0-9_]+)_SHIFT\s*[^\S\r\n]*[0-9]*$/def \1(val): return (val << \1_SHIFT) \& \1_MASK/p' extra/qcom_gpu_driver/msm_kgsl.h >> $BASE/kgsl.py
|
||||
sed -i "s\fcntl.ioctl(__fd, (__idir<<30)\__fd.ioctl((__idir<<30)\g" $BASE/kgsl.py
|
||||
python3 -c "import tinygrad.runtime.autogen.kgsl"
|
||||
}
|
||||
|
||||
@@ -320,152 +243,6 @@ generate_qcom() {
|
||||
python3 -c "import tinygrad.runtime.autogen.qcom_dsp"
|
||||
}
|
||||
|
||||
generate_pci() {
|
||||
clang2py -k cdefstum \
|
||||
/usr/include/linux/pci_regs.h \
|
||||
-o $BASE/pci.py
|
||||
fixup $BASE/pci.py
|
||||
}
|
||||
|
||||
generate_vfio() {
|
||||
clang2py -k cdefstum \
|
||||
/usr/include/linux/vfio.h \
|
||||
-o $BASE/vfio.py
|
||||
fixup $BASE/vfio.py
|
||||
sed -i "s\import ctypes\import ctypes, os\g" $BASE/vfio.py
|
||||
sed -i "s\import fcntl, functools\import functools" $BASE/vfio.py
|
||||
sed -i "s\import ctypes,os\a from tinygrad.runtime.support import FileIOInterface\g" $BASE/vfio.py
|
||||
sed -i "s\fcntl.ioctl(__fd, (__idir<<30)\return __fd.ioctl((__idir<<30)\g" $BASE/vfio.py
|
||||
}
|
||||
|
||||
generate_am() {
|
||||
AMKERN_COMMIT_HASH=ceb12c04e2b5b53ec0779362831f5ee40c4921e4
|
||||
AMKERN_SRC=/tmp/ROCK-Kernel-Driver-$AMKERN_COMMIT_HASH
|
||||
if [ ! -d "$AMKERN_SRC" ]; then
|
||||
git clone https://github.com/ROCm/ROCK-Kernel-Driver $AMKERN_SRC --depth 1
|
||||
fi
|
||||
AMKERN_AMD=$AMKERN_SRC/drivers/gpu/drm/amd/
|
||||
AMKERN_INC=$AMKERN_AMD/include/
|
||||
|
||||
clang2py -k cdefstum \
|
||||
extra/amdpci/headers/v11_structs.h \
|
||||
extra/amdpci/headers/v12_structs.h \
|
||||
extra/amdpci/headers/amdgpu_vm.h \
|
||||
extra/amdpci/headers/discovery.h \
|
||||
extra/amdpci/headers/amdgpu_ucode.h \
|
||||
extra/amdpci/headers/psp_gfx_if.h \
|
||||
extra/amdpci/headers/amdgpu_psp.h \
|
||||
extra/amdpci/headers/amdgpu_irq.h \
|
||||
extra/amdpci/headers/amdgpu_doorbell.h \
|
||||
$AMKERN_INC/soc15_ih_clientid.h \
|
||||
--clang-args="-include stdint.h" \
|
||||
-o $BASE/am/am.py
|
||||
fixup $BASE/am/am.py
|
||||
sed -i "s\(int64_t)\ \g" $BASE/am/am.py
|
||||
sed -i "s\AMDGPU_PTE_MTYPE_VG10(2)\AMDGPU_PTE_MTYPE_VG10(0, 2)\g" $BASE/am/am.py # incorrect parsing (TODO: remove when clang2py is gone).
|
||||
|
||||
clang2py -k cdefstum \
|
||||
$AMKERN_AMD/amdkfd/kfd_pm4_headers_ai.h \
|
||||
$AMKERN_AMD/amdgpu/soc15d.h \
|
||||
-o $BASE/am/pm4_soc15.py
|
||||
fixup $BASE/am/pm4_soc15.py
|
||||
|
||||
clang2py -k cdefstum \
|
||||
$AMKERN_AMD/amdkfd/kfd_pm4_headers_ai.h \
|
||||
$AMKERN_AMD/amdgpu/nvd.h \
|
||||
-o $BASE/am/pm4_nv.py
|
||||
fixup $BASE/am/pm4_nv.py
|
||||
|
||||
clang2py -k cdefstum \
|
||||
$AMKERN_INC/vega10_enum.h \
|
||||
-o $BASE/am/vega10.py
|
||||
fixup $BASE/am/vega10.py
|
||||
|
||||
clang2py -k cdefstum \
|
||||
$AMKERN_INC/navi10_enum.h \
|
||||
-o $BASE/am/navi10.py
|
||||
fixup $BASE/am/navi10.py
|
||||
|
||||
clang2py -k cdefstum \
|
||||
$AMKERN_INC/soc21_enum.h \
|
||||
-o $BASE/am/soc21.py
|
||||
fixup $BASE/am/soc21.py
|
||||
|
||||
clang2py -k cdefstum \
|
||||
$AMKERN_INC/soc24_enum.h \
|
||||
-o $BASE/am/soc24.py
|
||||
fixup $BASE/am/soc24.py
|
||||
|
||||
clang2py -k cdefstum \
|
||||
extra/hip_gpu_driver/sdma_registers.h \
|
||||
$AMKERN_AMD/amdgpu/vega10_sdma_pkt_open.h \
|
||||
--clang-args="-I/opt/rocm/include -x c++" \
|
||||
-o $BASE/am/sdma_4_0_0.py
|
||||
fixup $BASE/am/sdma_4_0_0.py
|
||||
|
||||
clang2py -k cdefstum \
|
||||
extra/hip_gpu_driver/sdma_registers.h \
|
||||
$AMKERN_AMD/amdgpu/navi10_sdma_pkt_open.h \
|
||||
--clang-args="-I/opt/rocm/include -x c++" \
|
||||
-o $BASE/am/sdma_5_0_0.py
|
||||
fixup $BASE/am/sdma_5_0_0.py
|
||||
|
||||
clang2py -k cdefstum \
|
||||
extra/hip_gpu_driver/sdma_registers.h \
|
||||
$AMKERN_AMD/amdgpu/sdma_v6_0_0_pkt_open.h \
|
||||
--clang-args="-I/opt/rocm/include -x c++" \
|
||||
-o $BASE/am/sdma_6_0_0.py
|
||||
fixup $BASE/am/sdma_6_0_0.py
|
||||
|
||||
clang2py -k cdefstum \
|
||||
$AMKERN_AMD/pm/swsmu/inc/pmfw_if/smu_v13_0_0_ppsmc.h \
|
||||
$AMKERN_AMD/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h \
|
||||
extra/amdpci/headers/amdgpu_smu.h \
|
||||
-o $BASE/am/smu_v13_0_0.py
|
||||
fixup $BASE/am/smu_v13_0_0.py
|
||||
|
||||
clang2py -k cdefstum \
|
||||
$AMKERN_AMD/pm/swsmu/inc/pmfw_if/smu_v14_0_0_pmfw.h \
|
||||
$AMKERN_AMD/pm/swsmu/inc/pmfw_if/smu_v14_0_2_ppsmc.h \
|
||||
$AMKERN_AMD/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0.h \
|
||||
extra/amdpci/headers/amdgpu_smu.h \
|
||||
--clang-args="-include stdint.h" \
|
||||
-o $BASE/am/smu_v14_0_2.py
|
||||
fixup $BASE/am/smu_v14_0_2.py
|
||||
}
|
||||
|
||||
generate_sqtt() {
|
||||
clang2py -k cdefstum \
|
||||
extra/sqtt/sqtt.h \
|
||||
-o $BASE/sqtt.py
|
||||
|
||||
fixup $BASE/sqtt.py
|
||||
sed -i "s\import ctypes\import ctypes, os\g" $BASE/sqtt.py
|
||||
python3 -c "import tinygrad.runtime.autogen.sqtt"
|
||||
}
|
||||
|
||||
generate_webgpu() {
|
||||
clang2py extra/webgpu/webgpu.h -o $BASE/webgpu.py
|
||||
fixup $BASE/webgpu.py
|
||||
sed -i "s/FIXME_STUB/webgpu/g" "$BASE/webgpu.py"
|
||||
sed -i "s/FunctionFactoryStub()/ctypes.CDLL(webgpu_support.WEBGPU_PATH)/g" "$BASE/webgpu.py"
|
||||
sed -i "s/import ctypes/import ctypes, tinygrad.runtime.support.webgpu as webgpu_support/g" "$BASE/webgpu.py"
|
||||
python3 -c "import tinygrad.runtime.autogen.webgpu"
|
||||
}
|
||||
|
||||
generate_libusb() {
|
||||
clang2py -k cdefstum \
|
||||
/usr/include/libusb-1.0/libusb.h \
|
||||
-o $BASE/libusb.py
|
||||
|
||||
fixup $BASE/libusb.py
|
||||
sed -i "s\import ctypes\import ctypes, ctypes.util, os\g" $BASE/libusb.py
|
||||
sed -i "s/FIXME_STUB/libusb/g" "$BASE/libusb.py"
|
||||
sed -i "s/libusb_le16_to_cpu = libusb_cpu_to_le16//g" "$BASE/libusb.py"
|
||||
sed -i "s/FunctionFactoryStub()/None if (lib_path:=os.getenv('LIBUSB_PATH', ctypes.util.find_library('usb-1.0'))) is None else ctypes.CDLL(lib_path)/g" "$BASE/libusb.py"
|
||||
python3 -c "import tinygrad.runtime.autogen.libusb"
|
||||
}
|
||||
|
||||
if [ "$1" == "opencl" ]; then generate_opencl
|
||||
elif [ "$1" == "hip" ]; then generate_hip
|
||||
elif [ "$1" == "comgr" ]; then generate_comgr
|
||||
@@ -475,20 +252,11 @@ elif [ "$1" == "hsa" ]; then generate_hsa
|
||||
elif [ "$1" == "kfd" ]; then generate_kfd
|
||||
elif [ "$1" == "nv" ]; then generate_nv
|
||||
elif [ "$1" == "amd" ]; then generate_amd
|
||||
elif [ "$1" == "am" ]; then generate_am
|
||||
elif [ "$1" == "nvdrv" ]; then generate_nvdrv
|
||||
elif [ "$1" == "sqtt" ]; then generate_sqtt
|
||||
elif [ "$1" == "qcom" ]; then generate_qcom
|
||||
elif [ "$1" == "io_uring" ]; then generate_io_uring
|
||||
elif [ "$1" == "ib" ]; then generate_ib
|
||||
elif [ "$1" == "libc" ]; then generate_libc
|
||||
elif [ "$1" == "llvm" ]; then generate_llvm
|
||||
elif [ "$1" == "kgsl" ]; then generate_kgsl
|
||||
elif [ "$1" == "adreno" ]; then generate_adreno
|
||||
elif [ "$1" == "pci" ]; then generate_pci
|
||||
elif [ "$1" == "vfio" ]; then generate_vfio
|
||||
elif [ "$1" == "webgpu" ]; then generate_webgpu
|
||||
elif [ "$1" == "libusb" ]; then generate_libusb
|
||||
elif [ "$1" == "all" ]; then generate_opencl; generate_hip; generate_comgr; generate_cuda; generate_nvrtc; generate_hsa; generate_kfd; generate_nv; generate_amd; generate_io_uring; generate_libc; generate_am; generate_webgpu
|
||||
elif [ "$1" == "all" ]; then generate_opencl; generate_hip; generate_comgr; generate_cuda; generate_nvrtc; generate_hsa; generate_kfd; generate_nv; generate_amd; generate_io_uring; generate_libc
|
||||
else echo "usage: $0 <type>"
|
||||
fi
|
||||
|
||||
+38
-56
@@ -1,73 +1,71 @@
|
||||
# tinygrad is a tensor library, and as a tensor library it has multiple parts
|
||||
# 1. a "runtime". this allows buffer management, compilation, and running programs
|
||||
# 2. a "Device" that uses the runtime but specifies compute in an abstract way for all
|
||||
# 3. a "UOp" that fuses the compute into kernels, using memory only when needed
|
||||
# 3. a "LazyBuffer" that fuses the compute into kernels, using memory only when needed
|
||||
# 4. a "Tensor" that provides an easy to use frontend with autograd ".backward()"
|
||||
|
||||
|
||||
print("******** first, the runtime ***********")
|
||||
|
||||
from tinygrad.runtime.ops_cpu import ClangJITCompiler, CPUDevice, CPUProgram
|
||||
|
||||
cpu = CPUDevice()
|
||||
from tinygrad.runtime.ops_clang import ClangProgram, ClangCompiler, MallocAllocator
|
||||
|
||||
# allocate some buffers
|
||||
out = cpu.allocator.alloc(4)
|
||||
a = cpu.allocator.alloc(4)
|
||||
b = cpu.allocator.alloc(4)
|
||||
out = MallocAllocator.alloc(4)
|
||||
a = MallocAllocator.alloc(4)
|
||||
b = MallocAllocator.alloc(4)
|
||||
|
||||
# load in some values (little endian)
|
||||
cpu.allocator._copyin(a, memoryview(bytearray([2,0,0,0])))
|
||||
cpu.allocator._copyin(b, memoryview(bytearray([3,0,0,0])))
|
||||
MallocAllocator.copyin(a, bytearray([2,0,0,0]))
|
||||
MallocAllocator.copyin(b, bytearray([3,0,0,0]))
|
||||
|
||||
# compile a program to a binary
|
||||
lib = ClangJITCompiler().compile("void add(int *out, int *a, int *b) { out[0] = a[0] + b[0]; }")
|
||||
lib = ClangCompiler().compile("void add(int *out, int *a, int *b) { out[0] = a[0] + b[0]; }")
|
||||
|
||||
# create a runtime for the program
|
||||
fxn = cpu.runtime("add", lib)
|
||||
# create a runtime for the program (ctypes.CDLL)
|
||||
fxn = ClangProgram("add", lib)
|
||||
|
||||
# run the program
|
||||
fxn(out, a, b)
|
||||
|
||||
# check the data out
|
||||
print(val := cpu.allocator._as_buffer(out).cast("I").tolist()[0])
|
||||
print(val := MallocAllocator.as_buffer(out).cast("I").tolist()[0])
|
||||
assert val == 5
|
||||
|
||||
|
||||
print("******** second, the Device ***********")
|
||||
|
||||
DEVICE = "CPU" # NOTE: you can change this!
|
||||
DEVICE = "CLANG" # NOTE: you can change this!
|
||||
|
||||
import struct
|
||||
from tinygrad.dtype import dtypes
|
||||
from tinygrad.dtype import PtrDType, dtypes
|
||||
from tinygrad.device import Buffer, Device
|
||||
from tinygrad.uop.ops import UOp, Ops
|
||||
from tinygrad.ops import BinaryOps, MetaOps, UOp, UOps
|
||||
from tinygrad.shape.shapetracker import ShapeTracker
|
||||
|
||||
# allocate some buffers + load in values
|
||||
out = Buffer(DEVICE, 1, dtypes.int32).allocate()
|
||||
a = Buffer(DEVICE, 1, dtypes.int32).allocate().copyin(memoryview(bytearray(struct.pack("I", 2))))
|
||||
b = Buffer(DEVICE, 1, dtypes.int32).allocate().copyin(memoryview(bytearray(struct.pack("I", 3))))
|
||||
# NOTE: a._buf is the same as the return from cpu.allocator.alloc
|
||||
# NOTE: a._buf is the same as the return from MallocAllocator.alloc
|
||||
|
||||
# describe the computation
|
||||
buf_1 = UOp(Ops.DEFINE_GLOBAL, dtypes.int32.ptr(), (), 1)
|
||||
buf_2 = UOp(Ops.DEFINE_GLOBAL, dtypes.int32.ptr(), (), 2)
|
||||
ld_1 = UOp(Ops.LOAD, dtypes.int32, (buf_1.view(ShapeTracker.from_shape((1,))),))
|
||||
ld_2 = UOp(Ops.LOAD, dtypes.int32, (buf_2.view(ShapeTracker.from_shape((1,))),))
|
||||
buf_1 = UOp(UOps.DEFINE_GLOBAL, PtrDType(dtypes.int32), (), 1)
|
||||
buf_2 = UOp(UOps.DEFINE_GLOBAL, PtrDType(dtypes.int32), (), 2)
|
||||
ld_1 = UOp(UOps.LOAD, dtypes.int32, (buf_1, ShapeTracker.from_shape((1,)).to_uop()))
|
||||
ld_2 = UOp(UOps.LOAD, dtypes.int32, (buf_2, ShapeTracker.from_shape((1,)).to_uop()))
|
||||
alu = ld_1 + ld_2
|
||||
output_buf = UOp(Ops.DEFINE_GLOBAL, dtypes.int32.ptr(), (), 0)
|
||||
st_0 = UOp(Ops.STORE, dtypes.void, (output_buf.view(ShapeTracker.from_shape((1,))), alu))
|
||||
s = UOp(Ops.SINK, dtypes.void, (st_0,))
|
||||
output_buf = UOp(UOps.DEFINE_GLOBAL, PtrDType(dtypes.int32), (), 0)
|
||||
st_0 = UOp(UOps.STORE, dtypes.void, (output_buf, ShapeTracker.from_shape((1,)).to_uop(), alu))
|
||||
s = UOp(UOps.SINK, dtypes.void, (st_0,))
|
||||
|
||||
# convert the computation to a "linearized" format (print the format)
|
||||
from tinygrad.engine.realize import get_program, CompiledRunner
|
||||
program = get_program(s, Device[DEVICE].renderer)
|
||||
from tinygrad.engine.realize import get_kernel, CompiledRunner
|
||||
kernel = get_kernel(Device[DEVICE].renderer, s).linearize()
|
||||
|
||||
# compile a program (and print the source)
|
||||
fxn = CompiledRunner(program)
|
||||
fxn = CompiledRunner(kernel.to_program())
|
||||
print(fxn.p.src)
|
||||
# NOTE: fxn.clprg is the CPUProgram
|
||||
# NOTE: fxn.clprg is the ClangProgram
|
||||
|
||||
# run the program
|
||||
fxn.exec([out, a, b])
|
||||
@@ -76,52 +74,36 @@ fxn.exec([out, a, b])
|
||||
assert out.as_buffer().cast('I')[0] == 5
|
||||
|
||||
|
||||
print("******** third, the UOp ***********")
|
||||
print("******** third, the LazyBuffer ***********")
|
||||
|
||||
from tinygrad.engine.lazy import LazyBuffer
|
||||
from tinygrad.engine.realize import run_schedule
|
||||
from tinygrad.engine.schedule import create_schedule_with_vars
|
||||
from tinygrad.schedule.kernelize import get_kernelize_map
|
||||
from tinygrad.engine.schedule import create_schedule
|
||||
|
||||
# allocate some values + load in values
|
||||
a = UOp.new_buffer(DEVICE, 1, dtypes.int32)
|
||||
b = UOp.new_buffer(DEVICE, 1, dtypes.int32)
|
||||
a = LazyBuffer.metaop(MetaOps.EMPTY, (1,), dtypes.int32, DEVICE)
|
||||
b = LazyBuffer.metaop(MetaOps.EMPTY, (1,), dtypes.int32, DEVICE)
|
||||
a.buffer.allocate().copyin(memoryview(bytearray(struct.pack("I", 2))))
|
||||
b.buffer.allocate().copyin(memoryview(bytearray(struct.pack("I", 3))))
|
||||
del a.srcs
|
||||
del b.srcs
|
||||
|
||||
# describe the computation
|
||||
out = a + b
|
||||
s = UOp(Ops.SINK, dtypes.void, (out,))
|
||||
out = a.alu(BinaryOps.ADD, b)
|
||||
|
||||
# group the computation into kernels
|
||||
becomes_map = get_kernelize_map(s)
|
||||
|
||||
# the compute maps to an assign
|
||||
assign = becomes_map[a+b]
|
||||
|
||||
# the first source is the output buffer (data)
|
||||
assert assign.src[0].op is Ops.BUFFER
|
||||
# the second source is the kernel (compute)
|
||||
assert assign.src[1].op is Ops.KERNEL
|
||||
|
||||
# schedule the kernel graph in a linear list
|
||||
s = UOp(Ops.SINK, dtypes.void, (assign,))
|
||||
sched, _ = create_schedule_with_vars(s)
|
||||
assert len(sched) == 1
|
||||
# schedule the computation as a list of kernels
|
||||
sched = create_schedule([out])
|
||||
for si in sched: print(si.ast.op) # NOTE: the first two convert it to CLANG
|
||||
|
||||
# DEBUGGING: print the compute ast
|
||||
print(sched[-1].ast)
|
||||
# NOTE: sched[-1].ast is the same as st_0 above
|
||||
|
||||
# the output will be stored in a new buffer
|
||||
out = assign.buf_uop
|
||||
assert out.op is Ops.BUFFER and not out.buffer.is_allocated()
|
||||
print(out)
|
||||
|
||||
# run that schedule
|
||||
run_schedule(sched)
|
||||
|
||||
# check the data out
|
||||
assert out.is_realized and out.buffer.as_buffer().cast('I')[0] == 5
|
||||
assert out.realized.as_buffer().cast('I')[0] == 5
|
||||
|
||||
|
||||
print("******** fourth, the Tensor ***********")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# abstractions2 goes from back to front, here we will go from front to back
|
||||
from typing import List
|
||||
from tinygrad.helpers import tqdm
|
||||
from tqdm import tqdm
|
||||
from tinygrad.helpers import DEBUG
|
||||
|
||||
# *****
|
||||
# 0. Load mnist on the device
|
||||
@@ -26,17 +27,16 @@ l1n, l2n = l1.numpy(), l2.numpy()
|
||||
from tinygrad.nn.optim import SGD
|
||||
optim = SGD([l1, l2])
|
||||
|
||||
Tensor.training = True
|
||||
X, Y = X_train[(samples:=Tensor.randint(128, high=X_train.shape[0]))], Y_train[samples]
|
||||
optim.zero_grad()
|
||||
model(X).sparse_categorical_crossentropy(Y).backward()
|
||||
optim.schedule_step() # this will step the optimizer without running realize
|
||||
optim._step() # this will step the optimizer without running realize
|
||||
|
||||
# *****
|
||||
# 3. Create a schedule.
|
||||
|
||||
# The weight Tensors have been assigned to, but not yet realized. Everything is still lazy at this point
|
||||
# l1.uop and l2.uop define a computation graph
|
||||
# l1.lazydata and l2.lazydata define a computation graph
|
||||
|
||||
from tinygrad.engine.schedule import ScheduleItem
|
||||
schedule: List[ScheduleItem] = Tensor.schedule(l1, l2)
|
||||
@@ -48,7 +48,7 @@ for si in schedule: print(str(si)[:80])
|
||||
# 4. Lower a schedule.
|
||||
|
||||
from tinygrad.engine.realize import lower_schedule_item, ExecItem
|
||||
lowered: List[ExecItem] = [lower_schedule_item(si) for si in tqdm(schedule)]
|
||||
lowered: List[ExecItem] = [ExecItem(lower_schedule_item(si).prg, list(si.bufs)) for si in tqdm(schedule)]
|
||||
|
||||
# *****
|
||||
# 5. Run the schedule
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# AM Driver
|
||||
|
||||
AM driver is a userspace driver targeting AMD's RDNA3/RDNA4. You only need tinygrad to send compute tasks to your GPU!
|
||||
|
||||
## How to run?
|
||||
Make sure that amdgpu module is unloaded and just run tinygrad with `AMD=1`!
|
||||
|
||||
Optional requirements:
|
||||
|
||||
* System without IOMMU for P2P / SDMA support
|
||||
* vfio-pci module for IRQ handling
|
||||
|
||||
## Environment Variables
|
||||
|
||||
| Variable | Possible Value(s) | Description |
|
||||
|----------|------------------|-------------|
|
||||
| AM_RESET | [1] | Performs a full GPU reset (reloading all firmware and IP blocks) |
|
||||
| AM_DEBUG | [0-4] | Sets the level of additional debugging information |
|
||||
|
||||
## AM Driver Details
|
||||
|
||||
### Compute & SDMA Queues
|
||||
|
||||
AM binds compute queues directly to MEC (bypassing MES). Tinygrad uses only one compute queue, which is bound at `pipe=0 queue=0`. Similarly, the single SDMA queue is bound at `engine=0 queue=0`.
|
||||
|
||||
### Boot
|
||||
|
||||
The GPU being passed can be in one of several states:
|
||||
1. Not initialized
|
||||
2. Initialized by amdgpu
|
||||
3. Initialized by AM
|
||||
|
||||
The first and second states require a full GPU setup since their states are unknown. The second state also requires a mode1 reset to reinitialize all components.
|
||||
|
||||
The third state can be set up partially to optimize boot time. In this case, only the GFX and SDMA IPs need to be initialized. To enable this, AM uses a separate boot memory that is guaranteed not to be overwritten. This physical memory is utilized for all blocks that are initialized only during the initial AM boot. To determine if the GPU is in the third state, AM uses `regSCRATCH_REG7` as a flag.
|
||||
|
||||
### VM Management
|
||||
|
||||
Each AM device sets up only a single `VMID=0` and one page directory. The page directory used is 3-level and thus supports up to 512GB of virtual addresses. All AM devices are located in one virtual address space.
|
||||
@@ -7,17 +7,19 @@ The tinygrad framework has four pieces
|
||||
|
||||
There is a good [bunch of tutorials](https://mesozoic-egg.github.io/tinygrad-notes/) by Di Zhu that go over tinygrad internals.
|
||||
|
||||
There's also a [doc describing speed](../developer/speed.md)
|
||||
|
||||
## Frontend
|
||||
|
||||
Everything in [Tensor](../tensor/index.md) is syntactic sugar around constructing a graph of [UOps](../developer/uop.md).
|
||||
Everything in [Tensor](../tensor/index.md) is syntactic sugar around [function.py](function.md), where the forwards and backwards passes are implemented for the different functions. There's about 25 of them, implemented using about 20 basic ops. Those basic ops go on to construct a graph of:
|
||||
|
||||
The `UOp` graph specifies the compute in terms of low level tinygrad ops. Not all UOps will actually become realized. There's two types of UOps, base and view. base contains compute into a contiguous buffer, and view is a view (specified by a ShapeTracker). Inputs to a base can be either base or view, inputs to a view can only be a single base.
|
||||
::: tinygrad.engine.lazy.LazyBuffer
|
||||
options:
|
||||
show_source: false
|
||||
|
||||
The `LazyBuffer` graph specifies the compute in terms of low level tinygrad ops. Not all LazyBuffers will actually become realized. There's two types of LazyBuffers, base and view. base contains compute into a contiguous buffer, and view is a view (specified by a ShapeTracker). Inputs to a base can be either base or view, inputs to a view can only be a single base.
|
||||
|
||||
## Scheduling
|
||||
|
||||
The [scheduler](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/engine/schedule.py) converts the graph of UOps into a list of `ScheduleItem`. One `ScheduleItem` is one kernel on the GPU, and the scheduler is responsible for breaking the large compute graph into subgraphs that can fit in a kernel. `ast` specifies what compute to run, and `bufs` specifies what buffers to run it on.
|
||||
The [scheduler](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/engine/schedule.py) converts the graph of LazyBuffers into a list of `ScheduleItem`. One `ScheduleItem` is one kernel on the GPU, and the scheduler is responsible for breaking the large compute graph into subgraphs that can fit in a kernel. `ast` specifies what compute to run, and `bufs` specifies what buffers to run it on.
|
||||
|
||||
::: tinygrad.engine.schedule.ScheduleItem
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
::: tinygrad.function
|
||||
options:
|
||||
members: [
|
||||
"Contiguous",
|
||||
"ContiguousBackward",
|
||||
"Cast",
|
||||
"Neg",
|
||||
"Reciprocal",
|
||||
"Sin",
|
||||
"Relu",
|
||||
"Log",
|
||||
"Exp",
|
||||
"Sqrt",
|
||||
"Sigmoid",
|
||||
"Sign",
|
||||
"Less",
|
||||
"Eq",
|
||||
"Xor",
|
||||
"Add",
|
||||
"Sub",
|
||||
"Mul",
|
||||
"Div",
|
||||
"Where",
|
||||
"Sum",
|
||||
"Max",
|
||||
"Expand",
|
||||
"Reshape",
|
||||
"Permute",
|
||||
"Pad",
|
||||
"Shrink",
|
||||
"Flip",
|
||||
]
|
||||
show_source: false
|
||||
+46
-17
@@ -6,29 +6,57 @@ The main aspect of HCQ-compatible runtimes is how they interact with devices. In
|
||||
|
||||
### Command Queues
|
||||
|
||||
To interact with devices you create a `HWQueue`. Some methods are required, like timestamp and synchronization methods like [signal](#tinygrad.runtime.support.hcq.HWQueue.signal) and [wait](#tinygrad.runtime.support.hcq.HWQueue.wait), while others are dependent on it being a compute or copy queue.
|
||||
To interact with devices, there are 2 types of queues: `HWComputeQueue` and `HWCopyQueue`. Commands which are defined in a base `HWCommandQueue` class should be supported by both queues. These methods are timestamp and synchronization methods like [signal](#tinygrad.runtime.support.hcq.HWCommandQueue.signal) and [wait](#tinygrad.runtime.support.hcq.HWCommandQueue.wait).
|
||||
|
||||
For example, the following Python code enqueues a wait, execute, and signal command on the HCQ-compatible device:
|
||||
```python
|
||||
HWQueue().wait(signal_to_wait, value_to_wait) \
|
||||
.exec(program, args_state, global_dims, local_dims) \
|
||||
.signal(signal_to_fire, value_to_fire) \
|
||||
.submit(your_device)
|
||||
HWComputeQueue().wait(signal_to_wait, value_to_wait) \
|
||||
.exec(program, args_state, global_dims, local_dims) \
|
||||
.signal(signal_to_fire, value_to_fire) \
|
||||
.submit(your_device)
|
||||
```
|
||||
|
||||
Each runtime should implement the required functions that are defined in the `HWQueue` classes.
|
||||
Each runtime should implement the required functions that are defined in the `HWCommandQueue`, `HWComputeQueue`, and `HWCopyQueue` classes.
|
||||
|
||||
::: tinygrad.runtime.support.hcq.HWQueue
|
||||
::: tinygrad.runtime.support.hcq.HWCommandQueue
|
||||
options:
|
||||
members: [
|
||||
"signal",
|
||||
"wait",
|
||||
"timestamp",
|
||||
"update_signal",
|
||||
"update_wait",
|
||||
"bind",
|
||||
"submit",
|
||||
]
|
||||
show_source: false
|
||||
|
||||
::: tinygrad.runtime.support.hcq.HWComputeQueue
|
||||
options:
|
||||
members: [
|
||||
"memory_barrier",
|
||||
"exec",
|
||||
"update_exec",
|
||||
]
|
||||
show_source: false
|
||||
|
||||
::: tinygrad.runtime.support.hcq.HWCopyQueue
|
||||
options:
|
||||
members: [
|
||||
"copy",
|
||||
"update_copy",
|
||||
]
|
||||
show_source: false
|
||||
|
||||
#### Implementing custom commands
|
||||
|
||||
To implement custom commands in the queue, use the @hcq_command decorator for your command implementations.
|
||||
|
||||
::: tinygrad.runtime.support.hcq.hcq_command
|
||||
options:
|
||||
members: [
|
||||
"copy",
|
||||
"update_copy",
|
||||
]
|
||||
show_source: false
|
||||
|
||||
@@ -52,11 +80,11 @@ Signals are device-dependent structures used for synchronization and timing in H
|
||||
The following Python code demonstrates the usage of signals:
|
||||
|
||||
```python
|
||||
signal = your_device.new_signal(value=0)
|
||||
signal = your_device.signal_t()
|
||||
|
||||
HWQueue().timestamp(signal) \
|
||||
.signal(signal, value_to_fire) \
|
||||
.submit(your_device)
|
||||
HWComputeQueue().timestamp(signal) \
|
||||
.signal(signal, value_to_fire) \
|
||||
.submit(your_device)
|
||||
|
||||
signal.wait(value_to_fire)
|
||||
signaled_value = signal.value # should be the same as `value_to_fire`
|
||||
@@ -106,17 +134,18 @@ Backends must adhere to the `HCQBuffer` protocol when returning allocation resul
|
||||
members: true
|
||||
show_source: false
|
||||
|
||||
**Lifetime**: The `HCQArgsState` is passed to `HWQueue.exec` and is guaranteed not to be freed until `HWQueue.submit` for the same queue is called.
|
||||
**Lifetime**: The `HCQArgsState` is passed to `HWComputeQueue.exec` and is guaranteed not to be freed until `HWComputeQueue.submit` for the same queue is called.
|
||||
|
||||
### Synchronization
|
||||
|
||||
HCQ-compatible devices use a global timeline signal for synchronizing all operations. This mechanism ensures proper ordering and completion of tasks across the device. By convention, `self.timeline_value` points to the next value to signal. So, to wait for all previous operations on the device to complete, wait for `self.timeline_value - 1` value. The following Python code demonstrates the typical usage of signals to synchronize execution to other operations on the device:
|
||||
|
||||
```python
|
||||
HWQueue().wait(your_device.timeline_signal, your_device.timeline_value - 1) \
|
||||
.exec(...)
|
||||
.signal(your_device.timeline_signal, your_device.next_timeline()) \
|
||||
.submit(your_device)
|
||||
HWComputeQueue().wait(your_device.timeline_signal, your_device.timeline_value - 1) \
|
||||
.exec(...)
|
||||
.signal(your_device.timeline_signal, your_device.timeline_value) \
|
||||
.submit(your_device)
|
||||
your_device.timeline_value += 1
|
||||
|
||||
# Optionally wait for execution
|
||||
your_device.timeline_signal.wait(your_device.timeline_value - 1)
|
||||
@@ -124,5 +153,5 @@ your_device.timeline_signal.wait(your_device.timeline_value - 1)
|
||||
|
||||
## HCQGraph
|
||||
|
||||
[HCQGraph](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/graph/hcq.py) is a core feature that implements `GraphRunner` for HCQ-compatible devices. `HCQGraph` builds static `HWQueue` for all operations per device. To optimize enqueue time, only the necessary parts of the queues are updated for each run using the symbolic variables, avoiding a complete rebuild.
|
||||
[HCQGraph](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/graph/hcq.py) is a core feature that implements `GraphRunner` for HCQ-compatible devices. `HCQGraph` builds a static `HWComputeQueue` and `HWCopyQueue` for all operations per device. To optimize enqueue time, only the necessary parts of the queues are updated for each run using the update APIs of the queues, avoiding a complete rebuild.
|
||||
Optionally, queues can implement a `bind` API, which allows further optimization by eliminating the need to copy the queues into the device ring.
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
# Kernel Creation
|
||||
|
||||
Tinygrad lazily builds up a graph of Tensor operations. The Tensor graph includes a mix of:
|
||||
|
||||
- Buffer and Assignment Ops: `BUFFER`, `BUFFER_VIEW`, `COPY`, `ASSIGN`
|
||||
- Movement Ops: `RESHAPE`, `EXPAND`, `PERMUTE`, `PAD`, `SHRINK`, `FLIP`
|
||||
- Compute Ops: `ADD`, `MUL`, `REDUCE_AXIS`, ...
|
||||
|
||||
`Tensor.kernelize` creates the kernels and buffers needed to realize the output Tensor(s).
|
||||
|
||||
## Kernelize flow
|
||||
|
||||
Let's see how a multiply add Tensor graph becomes a fused elementwise kernel.
|
||||
|
||||
```py
|
||||
# initialize 3 input buffers on the device
|
||||
a = Tensor([1]).realize()
|
||||
b = Tensor([2]).realize()
|
||||
c = Tensor([3]).realize()
|
||||
|
||||
# create the Tensor graph
|
||||
mul = a*b
|
||||
out = mul+c
|
||||
|
||||
print(mul) # <Tensor <UOp METAL (1,) int (<Ops.MUL: 48>, None)> on METAL with grad None>
|
||||
print(out) # <Tensor <UOp METAL (1,) int (<Ops.ADD: 52>, None)> on METAL with grad None>
|
||||
|
||||
out.kernelize()
|
||||
|
||||
print(mul) # <Tensor <UOp METAL (1,) int (<Ops.MUL: 48>, None)> on METAL with grad None>
|
||||
print(out) # <Tensor <UOp METAL (1,) int (<Ops.ASSIGN: 66>, None)> on METAL with grad None>
|
||||
```
|
||||
|
||||
The multiply Tensor stays the same because it is fused. The output Tensor's UOp becomes a new ASSIGN UOp:
|
||||
|
||||
```py
|
||||
print(out.uop)
|
||||
```
|
||||
|
||||
The first source is the output BUFFER:
|
||||
|
||||
```
|
||||
UOp(Ops.BUFFER, dtypes.int, arg=1, src=(
|
||||
UOp(Ops.DEVICE, dtypes.void, arg='METAL', src=()),
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=6, src=()),))
|
||||
```
|
||||
|
||||
And the second source is the KERNEL and its 4 buffer edges (output_buffer, a, b, c):
|
||||
|
||||
```
|
||||
UOp(Ops.KERNEL, dtypes.void, arg=<Kernel 12 SINK(<Ops.STORE: 45>,) (__add__, __mul__)>, src=(
|
||||
UOp(Ops.BUFFER, dtypes.int, arg=1, src=(
|
||||
x1:=UOp(Ops.DEVICE, dtypes.void, arg='METAL', src=()),
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=6, src=()),)),
|
||||
UOp(Ops.BUFFER, dtypes.int, arg=1, src=(
|
||||
x1,
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=1, src=()),)),
|
||||
UOp(Ops.BUFFER, dtypes.int, arg=1, src=(
|
||||
x1,
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=3, src=()),)),
|
||||
UOp(Ops.BUFFER, dtypes.int, arg=1, src=(
|
||||
x1,
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=5, src=()),)),))
|
||||
```
|
||||
|
||||
KERNEL describes the compute AST, metadata and memory dependencies.
|
||||
|
||||
BUFFER holds a reference to the device memory where the output will be stored.
|
||||
|
||||
Once a Tensor is kernelized, all children will LOAD its BUFFER, instead of fusing it:
|
||||
|
||||
```py
|
||||
child = out+2
|
||||
child.kernelize()
|
||||
print(child.uop.src[1].arg.ast)
|
||||
```
|
||||
|
||||
```
|
||||
UOp(Ops.SINK, dtypes.void, arg=None, src=(
|
||||
UOp(Ops.STORE, dtypes.void, arg=None, src=(
|
||||
UOp(Ops.DEFINE_GLOBAL, dtypes.int.ptr(1), arg=0, src=()),
|
||||
x2:=UOp(Ops.VIEW, dtypes.void, arg=ShapeTracker(views=(View(shape=(1,), strides=(0,), offset=0, mask=None, contiguous=True),)), src=()),
|
||||
UOp(Ops.ADD, dtypes.int, arg=None, src=(
|
||||
UOp(Ops.LOAD, dtypes.int, arg=None, src=(
|
||||
UOp(Ops.DEFINE_GLOBAL, dtypes.int.ptr(1), arg=1, src=()),
|
||||
x2,)),
|
||||
UOp(Ops.CONST, dtypes.int, arg=2, src=(
|
||||
x2,)),)),)),))
|
||||
```
|
||||
|
||||
`Tensor.realize` will execute the kernels and write outputs to memory:
|
||||
|
||||
```py
|
||||
Tensor.realize(out)
|
||||
print(out) # <Tensor <UOp METAL (1,) int (<Ops.BUFFER: 23>, <buf real:True device:METAL size:1 dtype:dtypes.int offset:0>)> on METAL with grad None>
|
||||
print(out.item()) # 5
|
||||
```
|
||||
|
||||
<hr />
|
||||
|
||||
**Summary**
|
||||
|
||||
- The large Tensor graph is built from a mix of data, compute and movement Ops.
|
||||
|
||||
- `Tensor.kernelize` splits the Tensor graph into data (BUFFER), compute (KERNEL) and links dependencies with ASSIGN.
|
||||
|
||||
- `Tensor.realize` executes KERNELs on device and replaces the Tensor graph with just a BUFFER.
|
||||
|
||||
- Kernelize can be called multiple times on a Tensor. This allows for incrementally building the kernel fusion layout of a large Tensor graph, without having to call `realize` or `schedule`.
|
||||
@@ -1,66 +0,0 @@
|
||||
# tinygrad directory layout
|
||||
|
||||
This explains the flow of a big graph down to programs.
|
||||
|
||||
Directories are listed in order of how they are processed.
|
||||
|
||||
---
|
||||
|
||||
## tinygrad/schedule
|
||||
|
||||
Group UOps into kernels.
|
||||
|
||||
::: tinygrad.schedule.kernelize.get_kernelize_map
|
||||
options:
|
||||
members: false
|
||||
show_labels: false
|
||||
show_source: false
|
||||
|
||||
---
|
||||
|
||||
## tinygrad/opt
|
||||
|
||||
Transforms the ast into an optimized ast. This is where BEAM search and heuristics live.
|
||||
|
||||
::: tinygrad.opt.get_optimized_ast
|
||||
options:
|
||||
members: false
|
||||
show_labels: false
|
||||
show_source: false
|
||||
|
||||
---
|
||||
|
||||
## tinygrad/codegen
|
||||
|
||||
Transform the optimized ast into a linearized list of UOps.
|
||||
|
||||
::: tinygrad.codegen.full_rewrite
|
||||
options:
|
||||
members: false
|
||||
show_labels: false
|
||||
show_source: false
|
||||
|
||||
---
|
||||
|
||||
## tinygrad/renderer
|
||||
|
||||
Transform the linearized list of UOps into a program, represented as a string.
|
||||
|
||||
::: tinygrad.renderer.Renderer
|
||||
options:
|
||||
members:
|
||||
- render
|
||||
show_labels: false
|
||||
show_source: false
|
||||
|
||||
---
|
||||
|
||||
## tinygrad/engine
|
||||
|
||||
Abstracted high level interface to the runtimes.
|
||||
|
||||
::: tinygrad.engine.realize.get_program
|
||||
options:
|
||||
members: false
|
||||
show_labels: false
|
||||
show_source: false
|
||||
@@ -36,9 +36,9 @@ The `Allocator` class is responsible for managing memory on the device. There is
|
||||
|
||||
### Program
|
||||
|
||||
The `Program` class is created for each loaded program. It is responsible for executing the program on the device. As an example, here is a `CPUProgram` implementation which loads program and runs it.
|
||||
The `Program` class is created for each loaded program. It is responsible for compiling and executing the program on the device. As an example, here is a `ClangProgram` implementation which loads program and runs it.
|
||||
|
||||
::: tinygrad.runtime.ops_cpu.CPUProgram
|
||||
::: tinygrad.runtime.ops_clang.ClangProgram
|
||||
options:
|
||||
members: true
|
||||
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
# speed in tinygrad
|
||||
|
||||
## Overview
|
||||
|
||||
Speed refers to many different things. To break it down to four, there's:
|
||||
|
||||
- Compile Speed (Python)
|
||||
- Execution Speed (driver)
|
||||
- Model Speed (scheduler)
|
||||
- Kernel Speed (codegen)
|
||||
|
||||
## Compile Speed (Python)
|
||||
|
||||
This is how long the first run of your model takes. It's limited largely by the runtime of the Python doing UOp rewrites. Currently it's a bit slow, but on par with torch.compile. It gets even slower if you are using BEAM, since that's compiling many variants of each kernel.
|
||||
|
||||
This will be improved by writing faster graph_rewrite, doing less graph_rewrite, and better parallelization.
|
||||
|
||||
## Execution Speed (driver)
|
||||
|
||||
After your model is compiled, you are often using the `TinyJIT`. tinygrad has the best execution speed of any framework because it usually bypasses the GPU driver and prebuilds the command queue. It's tons faster than normal CUDA, and often even faster than CUDA Graph.
|
||||
|
||||
There's very little to improve here, as this is almost never the bottleneck.
|
||||
|
||||
## Model Speed (scheduler)
|
||||
|
||||
The scheduler determines how operations are grouped into kernels and which Tensors are written to memory. This is currently a big bottleneck of training speed.
|
||||
|
||||
The decisions are often not obvious. For example, when is it worth recomputing an arithmetic operation instead of storing and loading from memory? Example:
|
||||
|
||||
```python
|
||||
from tinygrad import Tensor
|
||||
a = Tensor.rand(100)
|
||||
b = Tensor.rand(100)
|
||||
c = Tensor.rand(100)
|
||||
d = Tensor.rand(100)
|
||||
out1 = a+b+c
|
||||
out2 = a+b+d
|
||||
Tensor.realize(out1, out2)
|
||||
```
|
||||
|
||||
The real answer is obvious, compute both `out1` and `out2` in the same kernel. But you can't always do that. If you can't, should `a+b` first be saved to a subbuffer? Or should both the `out1` and `out2` kernels recompute `a+b`?
|
||||
|
||||
In this case: with recompute (6 reads + 2 writes), no recompute (6 reads + 3 writes), so we should probably recompute. However, once you add movement ops and casts this is even harder to figure out. tinygrad doesn't yet have a systematic way to do it.
|
||||
|
||||
## Kernel Speed (codegen)
|
||||
|
||||
Given that you have decided how the model ops will be grouped and what will be written to memory, kernel speed determines how fast that operation is done. This is what BEAM changes, it searches over a set of equivalent kernels which all perform the same operation and finds the one which performs the task the fastest.
|
||||
|
||||
In `kernel.py` we have a set of `OptOps`, these control the parameters of the speed optimizations applied to the kernel.
|
||||
|
||||
### Memory
|
||||
|
||||
The main bottleneck in most kernels is accessing memory. In a freshman algorithms class, you'll learn about cache aware matrix multiplication, and this is all forms of that. While the same math is run, the order in which you run it can have large impacts on the speed depending on if the data you are loading. OptOps will change this order.
|
||||
|
||||
Memory, even cache, is often much slower than accessing the register file. The amount of times data is used in math is called the "arithmetic intensity". For operations like BS=1 GEMV, the arithmetic intensity is 1, but for GEMMs and convs it can be much higher. OptOps like UPCAST and UNROLL can increase this, but be careful of making them too large, as if there's too much register pressure on the GPU the warp scheduler may not be able to fit many warps, or even worse, it could be spilling to local memory.
|
||||
|
||||
4090s have 1 TB/s of ram bandwidth and ~160 TFLOPS of compute, so you need to use each loaded value ~100 times. The L1 cache has around 40 TB/s of bandwidth, so in order to get full compute utilization you need to use each value ~4 times.
|
||||
|
||||
A lot of work can still be done here. For example, we never copy the inputs to on chip SRAM, but this is often quite helpful for kernel speed. Also, we aren't doing a good job with L2 cache awareness (the locals handle L1 quite well)
|
||||
|
||||
### Tensor Cores
|
||||
|
||||
Many accelerators have Tensor Cores / MAC arrays / systolic arrays. The main value of these is that, since they are 2-D, they create an n^2 ratio between the compute and the input data.
|
||||
|
||||
GPUs use Tensor Cores instead of MAC arrays to fit better in the GPU warp paradigm. This is because the output of Tensor Cores is O(n) wrt the input, while the output of MAC arrays like the AMX is O(n^2)
|
||||
|
||||
We have a simple framework in tinygrad for adding these ALU blocks and achieving good performance from them.
|
||||
|
||||
### Indexing
|
||||
|
||||
Indexing determines the address of the memory we need to load. GPUs often have less integer math resources than floating point math, so this can sometimes be the bottleneck. We have a symbolic math engine in our rewrite rules to simplify indexing before it's emitted to the kernel. Newer NVIDIA GPUs have a "Tensor Memory Accelerator" to assist with fast indexing, however, this is not supported in tinygrad yet.
|
||||
@@ -1,10 +1,10 @@
|
||||
::: tinygrad.uop.ops.UOp
|
||||
::: tinygrad.ops.UOp
|
||||
options:
|
||||
members: false
|
||||
members_order: source
|
||||
show_labels: false
|
||||
|
||||
::: tinygrad.uop.ops.Ops
|
||||
::: tinygrad.ops.UOps
|
||||
options:
|
||||
members: true
|
||||
members_order: source
|
||||
|
||||
+9
-21
@@ -30,35 +30,23 @@ These control the behavior of core tinygrad even when used as a library.
|
||||
|
||||
Variable | Possible Value(s) | Description
|
||||
---|---|---
|
||||
DEBUG | [1-7] | enable debugging output (operations, timings, speed, generated code and more)
|
||||
GPU | [1] | enable the GPU (OpenCL) backend
|
||||
DEBUG | [1-6] | enable debugging output, with 4 you get operations, timings, speed, generated code and more
|
||||
GPU | [1] | enable the GPU backend
|
||||
CUDA | [1] | enable CUDA backend
|
||||
AMD | [1] | enable AMD backend
|
||||
NV | [1] | enable NV backend
|
||||
METAL | [1] | enable Metal backend (for Mac M1 and after)
|
||||
CPU | [1] | enable CPU (Clang) backend
|
||||
METAL_XCODE | [1] | enable Metal using macOS Xcode SDK
|
||||
CLANG | [1] | enable Clang backend
|
||||
LLVM | [1] | enable LLVM backend
|
||||
BEAM | [#] | number of beams in kernel beam search
|
||||
GRAPH | [1] | create a graph of all operations (requires graphviz)
|
||||
GRAPHUOPS | [1] | create a graph of uops (requires graphviz and saves at /tmp/uops.{svg,dot})
|
||||
GRAPHPATH | [/path/to] | where to put the generated graph
|
||||
DEFAULT_FLOAT | [HALF, ...]| specify the default float dtype (FLOAT32, HALF, BFLOAT16, FLOAT64, ...), default to FLOAT32
|
||||
IMAGE | [1-2] | enable 2d specific optimizations
|
||||
FLOAT16 | [1] | use float16 for images instead of float32
|
||||
PTX | [1] | enable the specialized [PTX](https://docs.nvidia.com/cuda/parallel-thread-execution/) assembler for Nvidia GPUs. If not set, defaults to generic CUDA codegen backend.
|
||||
PROFILE | [1] | enable profiling. This feature is supported in NV, AMD, QCOM and METAL backends.
|
||||
PROFILE | [1] | enable output of [perfetto](https://ui.perfetto.dev/) compatible profile. This feature is supported in NV and AMD backends.
|
||||
VISIBLE_DEVICES | [list[int]]| restricts the NV/AMD devices that are available. The format is a comma-separated list of identifiers (indexing starts with 0).
|
||||
JIT | [0-2] | 0=disabled, 1=[jit enabled](quickstart.md#jit) (default), 2=jit enabled, but graphs are disabled
|
||||
VIZ | [1] | 0=disabled, 1=[viz enabled](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/viz)
|
||||
ALLOW_TF32 | [1] | enable TensorFloat-32 tensor cores on Ampere or newer GPUs.
|
||||
WEBGPU_BACKEND | [WGPUBackendType_Metal, ...] | Force select a backend for WebGPU (Metal, DirectX, OpenGL, Vulkan...)
|
||||
CUDA_PATH | str | Use `CUDA_PATH/include` for CUDA headers for CUDA and NV backends. If not set, TinyGrad will use `/usr/local/cuda/include`, `/usr/include` and `/opt/cuda/include`.
|
||||
|
||||
## Debug breakdown
|
||||
|
||||
Variable | Value | Description
|
||||
---|---|---
|
||||
DEBUG | >= 1 | Enables debugging and lists devices being used
|
||||
DEBUG | >= 2 | Provides performance metrics for operations, including timing, memory usage, bandwidth for each kernel execution
|
||||
DEBUG | >= 3 | Outputs buffers used for each kernel (shape, dtype and strides) and the applied optimizations at a kernel level
|
||||
DEBUG | >= 4 | Outputs the generated kernel code
|
||||
DEBUG | >= 5 | Displays the intermediate representation of the computation UOps (AST)
|
||||
DEBUG | >= 6 | Displays the intermediate representation of the computation UOps in a linearized manner, detailing the operation sequence
|
||||
DEBUG | >= 7 | Outputs the assembly code generated for the target hardware
|
||||
JIT | [0-2] | 0=disabled, 1=[jit enabled](quickstart.md#jit) (default), 2=jit enabled, but graphs are disabled
|
||||
+1
-5
@@ -28,10 +28,6 @@ To understand what training looks like in tinygrad, you should read `beautiful_m
|
||||
|
||||
We have a [quickstart guide](quickstart.md) and a [showcase](showcase.md)
|
||||
|
||||
## tinygrad Stack
|
||||
|
||||
<img src="./tinygrad_vs_others.png" alt="Tinygrad vs others" style="max-width: 1000px; height: auto;" />
|
||||
|
||||
## Differences from PyTorch
|
||||
|
||||
If you are migrating from PyTorch, welcome. Most of the API is the same. We hope you will find tinygrad both familiar and somehow more "correct feeling"
|
||||
@@ -42,7 +38,7 @@ There's nothing special about a "Module" class in tinygrad, it's just a normal c
|
||||
|
||||
### tinygrad is functional
|
||||
|
||||
In tinygrad, you can do [`x.conv2d(w, b)`](tensor/ops.md/#tinygrad.Tensor.conv2d) or [`x.sparse_categorical_crossentropy(y)`](tensor/ops.md/#tinygrad.Tensor.sparse_categorical_crossentropy). We do also have a [`Conv2D`](nn.md/#tinygrad.nn.Conv2d) class like PyTorch if you want a place to keep the state, but all stateless operations don't have classes.
|
||||
In tinygrad, you can do [`x.conv2d(w, b)`](tensor/ops.md/#tinygrad.Tensor.conv2d) or [`x.sparse_categorical_cross_entropy(y)`](tensor/ops.md/#tinygrad.Tensor.sparse_categorical_crossentropy). We do also have a [`Conv2D`](nn.md/#tinygrad.nn.Conv2d) class like PyTorch if you want a place to keep the state, but all stateless operations don't have classes.
|
||||
|
||||
### tinygrad is lazy
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ from tinygrad import Device
|
||||
print(Device.DEFAULT)
|
||||
```
|
||||
|
||||
You will see `CUDA` here on a GPU instance, or `CPU` here on a CPU instance.
|
||||
You will see `CUDA` here on a GPU instance, or `CLANG` here on a CPU instance.
|
||||
|
||||
## A simple model
|
||||
|
||||
|
||||
@@ -29,12 +29,4 @@
|
||||
::: tinygrad.nn.state.get_state_dict
|
||||
::: tinygrad.nn.state.get_parameters
|
||||
::: tinygrad.nn.state.load_state_dict
|
||||
::: tinygrad.nn.state.tar_extract
|
||||
options:
|
||||
show_signature: false
|
||||
separate_signature: false
|
||||
::: tinygrad.nn.state.torch_load
|
||||
options:
|
||||
show_signature: false
|
||||
separate_signature: false
|
||||
::: tinygrad.nn.state.gguf_load
|
||||
|
||||
+7
-4
@@ -110,7 +110,7 @@ class TinyNet:
|
||||
|
||||
def __call__(self, x):
|
||||
x = self.l1(x)
|
||||
x = x.leaky_relu()
|
||||
x = x.leakyrelu()
|
||||
x = self.l2(x)
|
||||
return x
|
||||
|
||||
@@ -118,7 +118,7 @@ net = TinyNet()
|
||||
```
|
||||
|
||||
We can see that the forward pass of our neural network is just the sequence of operations performed on the input tensor `x`.
|
||||
We can also see that functional operations like `leaky_relu` are not defined as classes and instead are just methods we can just call.
|
||||
We can also see that functional operations like `leakyrelu` are not defined as classes and instead are just methods we can just call.
|
||||
Finally, we just initialize an instance of our neural network, and we are ready to start training it.
|
||||
|
||||
## Training
|
||||
@@ -165,7 +165,7 @@ from extra.datasets import fetch_mnist
|
||||
Now we have everything we need to start training our neural network.
|
||||
We will be training for 1000 steps with a batch size of 64.
|
||||
|
||||
We use `with Tensor.train()` to set the internal flag `Tensor.training` to `True` during training.
|
||||
We use `with Tensor.train()` set the internal flag `Tensor.training` to `True` during training.
|
||||
Upon exit, the flag is restored to its previous value by the context manager.
|
||||
|
||||
```python
|
||||
@@ -302,4 +302,7 @@ You can find a full list and their descriptions in [env_vars.md](env_vars.md).
|
||||
|
||||
### Visualizing the Computation Graph
|
||||
|
||||
It is possible to visualize the computation graph of a neural network using VIZ=1.
|
||||
It is possible to visualize the computation graph of a neural network using [graphviz](https://graphviz.org/).
|
||||
|
||||
This is easily done by running a single pass (forward or backward!) of the neural network with the environment variable `GRAPH` set to `1`.
|
||||
The graph will be saved to `/tmp/net.svg` by default.
|
||||
|
||||
-293
@@ -1,293 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# this file is a "ramp" for people new to tinygrad to think about how to approach it
|
||||
# it is runnable and editable.
|
||||
# whenever you see stuff like DEBUG=2 or CPU=1 discussed, these are environment variables
|
||||
# in a unix shell like bash `DEBUG=2 CPU=1 python docs/ramp.py`
|
||||
|
||||
# this pip installs tinygrad master for the system
|
||||
# the -e allows you to edit the tinygrad folder and update system tinygrad
|
||||
# tinygrad is pure Python, so you are encouraged to do this
|
||||
# git pull in the tinygrad directory will also get you the latest
|
||||
"""
|
||||
git clone https://github.com/tinygrad/tinygrad.git
|
||||
cd tinygrad
|
||||
python3 -m pip install -e .
|
||||
"""
|
||||
|
||||
# %% ********
|
||||
print("******* PART 1 *******")
|
||||
|
||||
# we start with a Device.
|
||||
# a Device is where Tensors are stored and compute is run
|
||||
# tinygrad autodetects the best device on your system and makes it the DEFAULT
|
||||
from tinygrad import Device
|
||||
print(Device.DEFAULT) # on Mac, you can see this prints METAL
|
||||
|
||||
# now, lets create a Tensor
|
||||
from tinygrad import Tensor, dtypes
|
||||
t = Tensor([1,2,3,4])
|
||||
|
||||
# you can see this Tensor is on the DEFAULT device with int dtype and shape (4,)
|
||||
assert t.device == Device.DEFAULT
|
||||
assert t.dtype == dtypes.int
|
||||
assert t.shape == (4,)
|
||||
|
||||
# unlike in torch, if we print it, it doesn't print the contents
|
||||
# this is because tinygrad is lazy
|
||||
# this Tensor has not been computed yet
|
||||
print(t)
|
||||
# <Tensor <UOp METAL (4,) int (<Ops.COPY: 7>, None)> on METAL with grad None>
|
||||
|
||||
# the ".uop" property on Tensor contains the specification of how to compute it
|
||||
print(t.uop)
|
||||
"""
|
||||
UOp(Ops.COPY, dtypes.int, arg=None, src=(
|
||||
UOp(Ops.BUFFER, dtypes.int, arg=4, src=(
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=0, src=()),
|
||||
UOp(Ops.DEVICE, dtypes.void, arg='PYTHON', src=()),)),
|
||||
UOp(Ops.DEVICE, dtypes.void, arg='METAL', src=()),))
|
||||
"""
|
||||
# as you can see, it's specifying a copy from PYTHON device
|
||||
# which is where the [1,2,3,4] array lives
|
||||
|
||||
# UOps are the specification language in tinygrad
|
||||
# they are immutable and form a DAG
|
||||
# they have a "Ops", a "dtype", a tuple of srcs (parents), and an arg
|
||||
|
||||
t.realize()
|
||||
# if we want to "realize" a tensor, we can with the "realize" method
|
||||
# now when we look at the uop, it's changed
|
||||
print(t.uop)
|
||||
"""
|
||||
UOp(Ops.BUFFER, dtypes.int, arg=4, src=(
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=1, src=()),
|
||||
UOp(Ops.DEVICE, dtypes.void, arg='METAL', src=()),))
|
||||
"""
|
||||
# the copy was actually run, and now the "uop" of the Tensor is just a BUFFER
|
||||
# if you run this script with DEBUG=2 in the environment, you can see the copy happen
|
||||
# *** METAL 1 copy 16, METAL <- PYTHON ...
|
||||
|
||||
# now let's do some compute
|
||||
# we look at the uop to see the specification of the compute
|
||||
t_times_2 = t * 2
|
||||
print(t_times_2.uop)
|
||||
"""
|
||||
UOp(Ops.MUL, dtypes.int, arg=None, src=(
|
||||
UOp(Ops.BUFFER, dtypes.int, arg=4, src=(
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=1, src=()),
|
||||
x2:=UOp(Ops.DEVICE, dtypes.void, arg='METAL', src=()),)),
|
||||
UOp(Ops.EXPAND, dtypes.int, arg=(4,), src=(
|
||||
UOp(Ops.RESHAPE, dtypes.int, arg=(1,), src=(
|
||||
UOp(Ops.CONST, dtypes.int, arg=2, src=(
|
||||
UOp(Ops.VIEW, dtypes.void, arg=ShapeTracker(views=(View(shape=(), strides=(), offset=0, mask=None, contiguous=True),)), src=(
|
||||
x2,)),)),)),)),))
|
||||
"""
|
||||
# the BUFFER from above is being multiplied by a CONST 2
|
||||
# it's RESHAPEd and EXPANDed to broadcast the CONST to the BUFFER
|
||||
|
||||
# we can check the result with
|
||||
assert t_times_2.tolist() == [2, 4, 6, 8]
|
||||
|
||||
# UOps are both immutable and globally unique
|
||||
# if i multiply the Tensor by 4 twice, these result Tensors will have the same uop specification
|
||||
t_times_4_try_1 = t * 4
|
||||
t_times_4_try_2 = t * 4
|
||||
assert t_times_4_try_1.uop is t_times_4_try_2.uop
|
||||
# the specification isn't just the same, it's the exact same Python object
|
||||
assert t_times_4_try_1 is not t_times_4_try_2
|
||||
# the Tensor is a different Python object
|
||||
|
||||
# if we realize `t_times_4_try_1` ...
|
||||
t_times_4_try_1.realize()
|
||||
print(t_times_4_try_2.uop)
|
||||
"""
|
||||
UOp(Ops.BUFFER, dtypes.int, arg=4, src=(
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=4, src=()),
|
||||
UOp(Ops.DEVICE, dtypes.void, arg='METAL', src=()),))
|
||||
"""
|
||||
# ... `t_times_4_try_2` also becomes the same BUFFER
|
||||
assert t_times_4_try_1.uop is t_times_4_try_2.uop
|
||||
# so this print doesn't require any computation, just a copy back to the CPU so we can print it
|
||||
print("** only the copy start")
|
||||
print(t_times_4_try_2.tolist()) # [4, 8, 12, 16]
|
||||
print("** only the copy end")
|
||||
# you can confirm this with DEBUG=2, seeing what's printed in between the "**" prints
|
||||
|
||||
# tinygrad has an auto differentiation engine that operates according to these same principles
|
||||
# the derivative of "log(x)" is "1/x", and you can see this on line 20 of gradient.py
|
||||
t_float = Tensor([3.0])
|
||||
t_log = t_float.log()
|
||||
t_log_grad, = t_log.sum().gradient(t_float)
|
||||
# due to how log is implemented, this gradient contains a lot of UOps
|
||||
print(t_log_grad.uop)
|
||||
# ...not shown here...
|
||||
# but if you run with DEBUG=4 (CPU=1 used here for simpler code), you can see the generated code
|
||||
"""
|
||||
void E_(float* restrict data0, float* restrict data1) {
|
||||
float val0 = *(data1+0);
|
||||
*(data0+0) = (0.6931471805599453f*(1/(val0*0.6931471805599453f)));
|
||||
}
|
||||
"""
|
||||
# the derivative is close to 1/3
|
||||
assert (t_log_grad.item() - 1/3) < 1e-6
|
||||
|
||||
# %% ********
|
||||
print("******* PART 2 *******")
|
||||
|
||||
# we redefine the same t here so this cell can run on it's own
|
||||
from tinygrad import Tensor
|
||||
t = Tensor([1,2,3,4])
|
||||
|
||||
# what's above gives you enough of an understanding to go use tinygrad as a library
|
||||
# however, a lot of the beauty of tinygrad is in how easy it is to interact with the internals
|
||||
# NOTE: the APIs here are subject to change
|
||||
|
||||
t_plus_3_plus_4 = t + 3 + 4
|
||||
print(t_plus_3_plus_4.uop)
|
||||
"""
|
||||
UOp(Ops.ADD, dtypes.int, arg=None, src=(
|
||||
UOp(Ops.ADD, dtypes.int, arg=None, src=(
|
||||
UOp(Ops.BUFFER, dtypes.int, arg=4, src=(
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=1, src=()),
|
||||
x3:=UOp(Ops.DEVICE, dtypes.void, arg='CPU', src=()),)),
|
||||
UOp(Ops.EXPAND, dtypes.int, arg=(4,), src=(
|
||||
UOp(Ops.RESHAPE, dtypes.int, arg=(1,), src=(
|
||||
UOp(Ops.CONST, dtypes.int, arg=3, src=(
|
||||
x7:=UOp(Ops.VIEW, dtypes.void, arg=ShapeTracker(views=(View(shape=(), strides=(), offset=0, mask=None, contiguous=True),)), src=(
|
||||
x3,)),)),)),)),)),
|
||||
UOp(Ops.EXPAND, dtypes.int, arg=(4,), src=(
|
||||
UOp(Ops.RESHAPE, dtypes.int, arg=(1,), src=(
|
||||
UOp(Ops.CONST, dtypes.int, arg=4, src=(
|
||||
x7,)),)),)),))
|
||||
"""
|
||||
# you can see it's adding both 3 and 4
|
||||
|
||||
# but by the time we are actually running the code, it's adding 7
|
||||
# `kernelize` will simplify and group the operations in the graph into kernels
|
||||
t_plus_3_plus_4.kernelize()
|
||||
print(t_plus_3_plus_4.uop)
|
||||
"""
|
||||
UOp(Ops.ASSIGN, dtypes.int, arg=None, src=(
|
||||
x0:=UOp(Ops.BUFFER, dtypes.int, arg=4, src=(
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=7, src=()),
|
||||
x2:=UOp(Ops.DEVICE, dtypes.void, arg='CPU', src=()),)),
|
||||
UOp(Ops.KERNEL, dtypes.void, arg=<Kernel 12 SINK(<Ops.STORE: 48>,) (__add__,)>, src=(
|
||||
x0,
|
||||
UOp(Ops.BUFFER, dtypes.int, arg=4, src=(
|
||||
UOp(Ops.UNIQUE, dtypes.void, arg=1, src=()),
|
||||
x2,)),)),))
|
||||
"""
|
||||
# ASSIGN has two srcs, src[0] is the BUFFER that's assigned to, and src[1] is the thing to assign
|
||||
# src[1] is the GPU Kernel that's going to be run
|
||||
# we can get the ast of the Kernel as follows
|
||||
kernel_ast = t_plus_3_plus_4.uop.src[1].arg.ast
|
||||
|
||||
# almost everything in tinygrad functions as a rewrite of the UOps
|
||||
# the codegen rewrites the ast to a simplified form ready for "rendering"
|
||||
from tinygrad.codegen import full_rewrite_to_sink
|
||||
rewritten_ast = full_rewrite_to_sink(kernel_ast)
|
||||
print(rewritten_ast)
|
||||
"""
|
||||
UOp(Ops.SINK, dtypes.void, arg=None, src=(
|
||||
UOp(Ops.STORE, dtypes.void, arg=None, src=(
|
||||
UOp(Ops.INDEX, dtypes.int.ptr(4), arg=None, src=(
|
||||
UOp(Ops.DEFINE_GLOBAL, dtypes.int.ptr(4), arg=0, src=()),
|
||||
x3:=UOp(Ops.SPECIAL, dtypes.int, arg=('gidx0', 4), src=()),)),
|
||||
UOp(Ops.ADD, dtypes.int, arg=None, src=(
|
||||
UOp(Ops.LOAD, dtypes.int, arg=None, src=(
|
||||
UOp(Ops.INDEX, dtypes.int.ptr(4), arg=None, src=(
|
||||
UOp(Ops.DEFINE_GLOBAL, dtypes.int.ptr(4), arg=1, src=()),
|
||||
x3,)),)),
|
||||
UOp(Ops.CONST, dtypes.int, arg=7, src=()),)),)),))
|
||||
"""
|
||||
# you can see at this point we are adding 7, not 3 and 4
|
||||
|
||||
# with DEBUG=4, we can see the code.
|
||||
# since optimizations are on, it UPCASTed the operation, explicitly writing out all 4 +7s
|
||||
t_plus_3_plus_4.realize()
|
||||
"""
|
||||
void E_4n2(int* restrict data0, int* restrict data1) {
|
||||
int val0 = *(data1+0);
|
||||
int val1 = *(data1+1);
|
||||
int val2 = *(data1+2);
|
||||
int val3 = *(data1+3);
|
||||
*(data0+0) = (val0+7);
|
||||
*(data0+1) = (val1+7);
|
||||
*(data0+2) = (val2+7);
|
||||
*(data0+3) = (val3+7);
|
||||
}
|
||||
"""
|
||||
# the function name E_4n2 is "E" for elementwise op (as opposed to "r" for reduce op)
|
||||
# "4" for the size, and "n2" for name deduping (it's the 3rd function with the same E and 4 in this session)
|
||||
# when you print the name with DEBUG=2, you'll see the 4 is yellow, meaning that it's upcasted
|
||||
# if you run with NOOPT=1 ...
|
||||
"""
|
||||
void E_4n2(int* restrict data0, int* restrict data1) {
|
||||
for (int ridx0 = 0; ridx0 < 4; ridx0++) {
|
||||
int val0 = *(data1+ridx0);
|
||||
*(data0+ridx0) = (val0+7);
|
||||
}
|
||||
}
|
||||
"""
|
||||
# ... you get this unoptimized code with a loop and the 4 is blue (for global). the color code is in kernel.py
|
||||
|
||||
# %% ********
|
||||
print("******* PART 3 *******")
|
||||
|
||||
# now, we go even lower and understand UOps better and how the graph rewrite engine works.
|
||||
# it's much simpler than what's in LLVM or MLIR
|
||||
|
||||
from tinygrad import dtypes
|
||||
from tinygrad.uop.ops import UOp, Ops
|
||||
|
||||
# first, we'll construct some const UOps
|
||||
a = UOp(Ops.CONST, dtypes.int, arg=2)
|
||||
b = UOp(Ops.CONST, dtypes.int, arg=2)
|
||||
|
||||
# if you have been paying attention, you should know these are the same Python object
|
||||
assert a is b
|
||||
|
||||
# UOps support normal Python math operations, so a_plus_b expresses the spec for 2 + 2
|
||||
a_plus_b = a + b
|
||||
print(a_plus_b)
|
||||
"""
|
||||
UOp(Ops.ADD, dtypes.int, arg=None, src=(
|
||||
x0:=UOp(Ops.CONST, dtypes.int, arg=2, src=()),
|
||||
x0,))
|
||||
"""
|
||||
|
||||
# we could actually render this 2+2 into a language like c and run it
|
||||
# or, we can use tinygrad's graph rewrite engine to "constant fold"
|
||||
|
||||
from tinygrad.uop.ops import graph_rewrite, UPat, PatternMatcher
|
||||
|
||||
# a `PatternMatcher` is a list of tuples. for each element in the list:
|
||||
# [0] is the pattern to match, and [1] is the function to run.
|
||||
# this function can return either a UOp to replace the pattern with, or None to not replace
|
||||
simple_pm = PatternMatcher([
|
||||
(UPat(Ops.ADD, src=(UPat(Ops.CONST, name="c1"), UPat(Ops.CONST, name="c2"))),
|
||||
lambda c1,c2: UOp(Ops.CONST, dtype=c1.dtype, arg=c1.arg+c2.arg)),
|
||||
])
|
||||
# this pattern matches the addition of two CONST and rewrites it into a single CONST UOp
|
||||
|
||||
# to actually apply the pattern to a_plus_b, we use graph_rewrite
|
||||
a_plus_b_simplified = graph_rewrite(a_plus_b, simple_pm)
|
||||
print(a_plus_b_simplified)
|
||||
"""
|
||||
UOp(Ops.CONST, dtypes.int, arg=4, src=())
|
||||
"""
|
||||
# 2+2 is in fact, 4
|
||||
|
||||
# we can also use syntactic sugar to write the pattern nicer
|
||||
simpler_pm = PatternMatcher([
|
||||
(UPat.cvar("c1")+UPat.cvar("c2"), lambda c1,c2: c1.const_like(c1.arg+c2.arg))
|
||||
])
|
||||
assert graph_rewrite(a_plus_b, simple_pm) is graph_rewrite(a_plus_b, simpler_pm)
|
||||
# note again the use of is, UOps are immutable and globally unique
|
||||
|
||||
# %% ********
|
||||
|
||||
# that brings you to an understanding of the most core concepts in tinygrad
|
||||
# you can run this with VIZ=1 to use the web based graph rewrite explorer
|
||||
# hopefully now you understand it. the nodes in the graph are just UOps
|
||||
+4
-64
@@ -1,74 +1,14 @@
|
||||
# Runtimes
|
||||
|
||||
tinygrad supports various runtimes, enabling your code to scale across a wide range of devices. The default runtime can be automatically selected based on the available hardware, or you can force a specific runtime to be default using environment variables (e.g., `CPU=1`).
|
||||
tinygrad supports various runtimes, enabling your code to scale across a wide range of devices. The default runtime can be automatically selected based on the available hardware, or you can force a specific runtime to be default using environment variables (e.g., `CLANG=1`).
|
||||
|
||||
| Runtime | Description | Requirements |
|
||||
|---------|-------------|--------------|
|
||||
| [NV](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_nv.py) | Provides acceleration for NVIDIA GPUs | Ampere/Ada series GPUs |
|
||||
| [AMD](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_amd.py) | Provides acceleration for AMD GPUs | RDNA2/RDNA3/RDNA4 series GPUs. You can select one of the interfaces for communication by setting `AMD_IFACE=(KFD|PCI)`. See [AMD interfaces](#amd-interfaces) for more details. |
|
||||
| [AMD](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_amd.py) | Provides acceleration for AMD GPUs | RDNA2/RDNA3 series GPUs |
|
||||
| [QCOM](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_qcom.py) | Provides acceleration for QCOM GPUs | 6xx series GPUs |
|
||||
| [METAL](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_metal.py) | Utilizes Metal for acceleration on Apple devices | M1+ Macs; Metal 3.0+ for `bfloat` support |
|
||||
| [CUDA](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_cuda.py) | Utilizes CUDA for acceleration on NVIDIA GPUs | NVIDIA GPU with CUDA support |
|
||||
| [GPU (OpenCL)](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_gpu.py) | Accelerates computations using OpenCL on GPUs | OpenCL 2.0 compatible device |
|
||||
| [CPU (C Code)](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_cpu.py) | Runs on CPU using the clang compiler | `clang` compiler in system `PATH` |
|
||||
| [LLVM (LLVM IR)](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_llvm.py) | Runs on CPU using the LLVM compiler infrastructure | llvm libraries installed and findable |
|
||||
| [WEBGPU](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_webgpu.py) | Runs on GPU using the Dawn WebGPU engine (used in Google Chrome) | Dawn library installed and findable. Download binaries [here](https://github.com/wpmed92/pydawn/releases/tag/v0.3.0). |
|
||||
|
||||
## Interoperability
|
||||
|
||||
tinygrad provides interoperability with OpenCL and PyTorch, allowing efficient tensor data sharing between frameworks through the `Tensor.from_blob` API. This enables zero-copy operations by working directly with external memory pointers.
|
||||
|
||||
**Important**: When using external memory pointers with tinygrad tensors, you must ensure these pointers remain valid throughout the entire lifetime of the tinygrad tensor to prevent memory corruption.
|
||||
|
||||
### `CUDA`/`METAL` PyTorch Interoperability
|
||||
|
||||
You can seamlessly work with CUDA/MPS tensors between PyTorch and tinygrad without data copying:
|
||||
```python
|
||||
from tinygrad.dtype import _from_torch_dtype
|
||||
tensor1 = torch.tensor([1.0, 2.0, 3.0], device=torch.device("cuda"))
|
||||
tiny_tensor1 = Tensor.from_blob(tensor1.data_ptr(), tensor1.shape, dtype=_from_torch_dtype(tensor1.dtype), device='CUDA')
|
||||
|
||||
# Before tinygrad calculations, mps needs to be synchronized to make sure data is valid.
|
||||
if data.device.type == "mps": torch.mps.synchronize()
|
||||
else: torch.cuda.synchronize()
|
||||
|
||||
x = (tiny_tensor1 + 1).realize()
|
||||
```
|
||||
|
||||
### `QCOM` OpenCL Interoperability
|
||||
|
||||
tinygrad supports OpenCL interoperability on `QCOM` backend.
|
||||
|
||||
Buffer interop allows direct access to OpenCL memory buffers:
|
||||
```python
|
||||
# create raw opencl buffer.
|
||||
cl_buf = cl.clCreateBuffer(cl_context, cl.CL_MEM_READ_WRITE, 0x100, None, status := ctypes.c_int32())
|
||||
|
||||
# extract pointers
|
||||
cl_buf_desc_ptr = to_mv(ctypes.addressof(cl_buf), 8).cast('Q')[0]
|
||||
rawbuf_ptr = to_mv(cl_buf_desc_ptr, 0x100).cast('Q')[20] # offset 0xA0 is a raw gpu pointer.
|
||||
|
||||
# create tiny tensor
|
||||
tiny = Tensor.from_blob(rawbuf_ptr, (8, 8), dtype=dtypes.int, device='QCOM')
|
||||
```
|
||||
|
||||
And the same for the images:
|
||||
```python
|
||||
# create cl image.
|
||||
cl_img = cl.clCreateImage2D(cl_context, cl.CL_MEM_READ_WRITE, cl.cl_image_format(cl.CL_RGBA, cl.CL_FLOAT), w, h, 0, None, status := ctypes.c_int32())
|
||||
|
||||
# extract pointers
|
||||
cl_buf_desc_ptr = to_mv(ctypes.addressof(cl_img), 8).cast('Q')[0]
|
||||
rawbuf_ptr = to_mv(cl_buf_desc_ptr, 0x100).cast('Q')[20] # offset 0xA0 is a raw gpu pointer.
|
||||
|
||||
# create tiny tensor
|
||||
tiny = Tensor.from_blob(rawbuf_ptr, (h*w*4,), dtype=dtypes.imagef((h,w)), device='QCOM')
|
||||
```
|
||||
|
||||
## AMD Interfaces
|
||||
AMD backend supports several interfaces for communicating with devices:
|
||||
|
||||
* `KFD`: uses the amdgpu driver
|
||||
* `PCI`: uses the [AM driver](developer/am.md)
|
||||
|
||||
You can force an interface by setting `AMD_IFACE` to one of these values. In the case of `AMD_IFACE=PCI`, this may unbind your GPU from the amdgpu driver.
|
||||
| [CLANG (C Code)](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_clang.py) | Runs on CPU using the clang compiler | `clang` compiler in system `PATH` |
|
||||
| [LLVM](https://github.com/tinygrad/tinygrad/tree/master/tinygrad/runtime/ops_llvm.py) | Runs on CPU using the LLVM compiler infrastructure | `llvmlite` package installed |
|
||||
|
||||
@@ -5,26 +5,18 @@
|
||||
::: tinygrad.Tensor.ones
|
||||
::: tinygrad.Tensor.full
|
||||
::: tinygrad.Tensor.arange
|
||||
::: tinygrad.Tensor.linspace
|
||||
::: tinygrad.Tensor.eye
|
||||
::: tinygrad.Tensor.full_like
|
||||
::: tinygrad.Tensor.zeros_like
|
||||
::: tinygrad.Tensor.ones_like
|
||||
|
||||
## Creation (external)
|
||||
|
||||
::: tinygrad.Tensor.from_blob
|
||||
::: tinygrad.Tensor.from_url
|
||||
|
||||
## Creation (random)
|
||||
|
||||
::: tinygrad.Tensor.manual_seed
|
||||
::: tinygrad.Tensor.rand
|
||||
::: tinygrad.Tensor.rand_like
|
||||
::: tinygrad.Tensor.randn
|
||||
::: tinygrad.Tensor.randn_like
|
||||
::: tinygrad.Tensor.randint
|
||||
::: tinygrad.Tensor.randperm
|
||||
::: tinygrad.Tensor.normal
|
||||
::: tinygrad.Tensor.uniform
|
||||
::: tinygrad.Tensor.scaled_uniform
|
||||
|
||||
@@ -13,16 +13,10 @@ Elementwise ops operate on a per element basis. They don't change the shape of t
|
||||
::: tinygrad.Tensor.sin
|
||||
::: tinygrad.Tensor.cos
|
||||
::: tinygrad.Tensor.tan
|
||||
::: tinygrad.Tensor.asin
|
||||
::: tinygrad.Tensor.acos
|
||||
::: tinygrad.Tensor.atan
|
||||
::: tinygrad.Tensor.trunc
|
||||
::: tinygrad.Tensor.ceil
|
||||
::: tinygrad.Tensor.floor
|
||||
::: tinygrad.Tensor.round
|
||||
::: tinygrad.Tensor.isinf
|
||||
::: tinygrad.Tensor.isnan
|
||||
::: tinygrad.Tensor.isfinite
|
||||
::: tinygrad.Tensor.lerp
|
||||
::: tinygrad.Tensor.square
|
||||
::: tinygrad.Tensor.clamp
|
||||
@@ -35,11 +29,8 @@ Elementwise ops operate on a per element basis. They don't change the shape of t
|
||||
|
||||
::: tinygrad.Tensor.relu
|
||||
::: tinygrad.Tensor.sigmoid
|
||||
::: tinygrad.Tensor.logsigmoid
|
||||
::: tinygrad.Tensor.hardsigmoid
|
||||
::: tinygrad.Tensor.elu
|
||||
::: tinygrad.Tensor.celu
|
||||
::: tinygrad.Tensor.selu
|
||||
::: tinygrad.Tensor.swish
|
||||
::: tinygrad.Tensor.silu
|
||||
::: tinygrad.Tensor.relu6
|
||||
@@ -51,10 +42,9 @@ Elementwise ops operate on a per element basis. They don't change the shape of t
|
||||
::: tinygrad.Tensor.asinh
|
||||
::: tinygrad.Tensor.acosh
|
||||
::: tinygrad.Tensor.hardtanh
|
||||
::: tinygrad.Tensor.erf
|
||||
::: tinygrad.Tensor.gelu
|
||||
::: tinygrad.Tensor.quick_gelu
|
||||
::: tinygrad.Tensor.leaky_relu
|
||||
::: tinygrad.Tensor.leakyrelu
|
||||
::: tinygrad.Tensor.mish
|
||||
::: tinygrad.Tensor.softplus
|
||||
::: tinygrad.Tensor.softsign
|
||||
@@ -65,19 +55,13 @@ Elementwise ops operate on a per element basis. They don't change the shape of t
|
||||
::: tinygrad.Tensor.sub
|
||||
::: tinygrad.Tensor.mul
|
||||
::: tinygrad.Tensor.div
|
||||
::: tinygrad.Tensor.idiv
|
||||
::: tinygrad.Tensor.mod
|
||||
::: tinygrad.Tensor.bitwise_xor
|
||||
::: tinygrad.Tensor.bitwise_and
|
||||
::: tinygrad.Tensor.bitwise_or
|
||||
::: tinygrad.Tensor.bitwise_not
|
||||
::: tinygrad.Tensor.xor
|
||||
::: tinygrad.Tensor.lshift
|
||||
::: tinygrad.Tensor.rshift
|
||||
::: tinygrad.Tensor.pow
|
||||
::: tinygrad.Tensor.maximum
|
||||
::: tinygrad.Tensor.minimum
|
||||
::: tinygrad.Tensor.where
|
||||
::: tinygrad.Tensor.copysign
|
||||
|
||||
## Casting Ops
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
## Movement (high level)
|
||||
|
||||
::: tinygrad.Tensor.__getitem__
|
||||
::: tinygrad.Tensor.gather
|
||||
::: tinygrad.Tensor.cat
|
||||
::: tinygrad.Tensor.stack
|
||||
@@ -18,14 +17,10 @@
|
||||
::: tinygrad.Tensor.repeat_interleave
|
||||
::: tinygrad.Tensor.split
|
||||
::: tinygrad.Tensor.chunk
|
||||
::: tinygrad.Tensor.unfold
|
||||
::: tinygrad.Tensor.meshgrid
|
||||
::: tinygrad.Tensor.squeeze
|
||||
::: tinygrad.Tensor.unsqueeze
|
||||
::: tinygrad.Tensor.pad2d
|
||||
::: tinygrad.Tensor.T
|
||||
::: tinygrad.Tensor.transpose
|
||||
::: tinygrad.Tensor.flatten
|
||||
::: tinygrad.Tensor.unflatten
|
||||
::: tinygrad.Tensor.diag
|
||||
::: tinygrad.Tensor.roll
|
||||
::: tinygrad.Tensor.rearrange
|
||||
@@ -6,10 +6,8 @@
|
||||
::: tinygrad.Tensor.min
|
||||
::: tinygrad.Tensor.any
|
||||
::: tinygrad.Tensor.all
|
||||
::: tinygrad.Tensor.isclose
|
||||
::: tinygrad.Tensor.mean
|
||||
::: tinygrad.Tensor.var
|
||||
::: tinygrad.Tensor.var_mean
|
||||
::: tinygrad.Tensor.std
|
||||
::: tinygrad.Tensor.std_mean
|
||||
::: tinygrad.Tensor.softmax
|
||||
@@ -23,24 +21,15 @@
|
||||
|
||||
::: tinygrad.Tensor.avg_pool2d
|
||||
::: tinygrad.Tensor.max_pool2d
|
||||
::: tinygrad.Tensor.max_unpool2d
|
||||
::: tinygrad.Tensor.conv2d
|
||||
::: tinygrad.Tensor.conv_transpose2d
|
||||
::: tinygrad.Tensor.dot
|
||||
::: tinygrad.Tensor.matmul
|
||||
::: tinygrad.Tensor.einsum
|
||||
::: tinygrad.Tensor.cumsum
|
||||
::: tinygrad.Tensor.cummax
|
||||
::: tinygrad.Tensor.triu
|
||||
::: tinygrad.Tensor.tril
|
||||
::: tinygrad.Tensor.interpolate
|
||||
::: tinygrad.Tensor.scatter
|
||||
::: tinygrad.Tensor.scatter_reduce
|
||||
::: tinygrad.Tensor.masked_select
|
||||
::: tinygrad.Tensor.masked_fill
|
||||
::: tinygrad.Tensor.sort
|
||||
::: tinygrad.Tensor.topk
|
||||
::: tinygrad.Tensor.multinomial
|
||||
|
||||
## Neural Network (functional)
|
||||
|
||||
@@ -55,4 +44,3 @@
|
||||
::: tinygrad.Tensor.binary_crossentropy_logits
|
||||
::: tinygrad.Tensor.sparse_categorical_crossentropy
|
||||
::: tinygrad.Tensor.cross_entropy
|
||||
::: tinygrad.Tensor.nll_loss
|
||||
|
||||
@@ -25,15 +25,10 @@
|
||||
::: tinygrad.Tensor.replace
|
||||
::: tinygrad.Tensor.assign
|
||||
::: tinygrad.Tensor.detach
|
||||
::: tinygrad.Tensor.clone
|
||||
::: tinygrad.Tensor.to
|
||||
::: tinygrad.Tensor.to_
|
||||
::: tinygrad.Tensor.shard
|
||||
::: tinygrad.Tensor.shard_
|
||||
::: tinygrad.Tensor.contiguous
|
||||
::: tinygrad.Tensor.contiguous_backward
|
||||
|
||||
## Gradient
|
||||
|
||||
::: tinygrad.Tensor.gradient
|
||||
::: tinygrad.Tensor.backward
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB |
@@ -1,9 +0,0 @@
|
||||
import globals from "globals";
|
||||
import pluginJs from "@eslint/js";
|
||||
import pluginHtml from "eslint-plugin-html";
|
||||
|
||||
export default [
|
||||
{files: ["**/*.html"], plugins: {html: pluginHtml}, rules:{"max-len": ["error", {"code": 150}]}},
|
||||
{languageOptions: {globals: globals.browser}},
|
||||
pluginJs.configs.recommended,
|
||||
];
|
||||
@@ -78,7 +78,10 @@ if __name__ == "__main__":
|
||||
|
||||
@TinyJit
|
||||
def get_action(obs:Tensor) -> Tensor:
|
||||
# TODO: with no_grad
|
||||
Tensor.no_grad = True
|
||||
ret = model(obs)[0].exp().multinomial().realize()
|
||||
Tensor.no_grad = False
|
||||
return ret
|
||||
|
||||
st, steps = time.perf_counter(), 0
|
||||
|
||||
+28
-32
@@ -3,19 +3,14 @@ start_tm = time.perf_counter()
|
||||
import math
|
||||
from typing import Tuple, cast
|
||||
import numpy as np
|
||||
from tinygrad import Tensor, nn, GlobalCounters, TinyJit, dtypes, Device
|
||||
from tinygrad import Tensor, nn, GlobalCounters, TinyJit, dtypes
|
||||
from tinygrad.helpers import partition, trange, getenv, Context
|
||||
from extra.lr_scheduler import OneCycleLR
|
||||
|
||||
GPUS = [f'{Device.DEFAULT}:{i}' for i in range(getenv("GPUS", 1))]
|
||||
|
||||
# override tinygrad defaults
|
||||
dtypes.default_float = dtypes.half
|
||||
Context(FUSE_ARANGE=1, FUSE_OPTIM=1).__enter__()
|
||||
|
||||
# from https://github.com/tysam-code/hlb-CIFAR10/blob/main/main.py
|
||||
batchsize = getenv("BS", 1024)
|
||||
assert batchsize % len(GPUS) == 0, f"{batchsize=} is not a multiple of {len(GPUS)=}"
|
||||
bias_scaler = 64
|
||||
hyp = {
|
||||
'opt': {
|
||||
@@ -72,7 +67,7 @@ class ConvGroup:
|
||||
cast(Tensor, self.norm2.weight).requires_grad = False
|
||||
def __call__(self, x:Tensor) -> Tensor:
|
||||
x = self.norm1(self.conv1(x).max_pool2d().float()).cast(dtypes.default_float).quick_gelu()
|
||||
return self.norm2(self.conv2(x).float()).cast(dtypes.default_float).quick_gelu() + x
|
||||
return self.norm2(self.conv2(x).float()).cast(dtypes.default_float).quick_gelu()
|
||||
|
||||
class SpeedyConvNet:
|
||||
def __init__(self):
|
||||
@@ -83,25 +78,23 @@ class SpeedyConvNet:
|
||||
self.linear = nn.Linear(depths['block3'], depths['num_classes'], bias=False)
|
||||
def __call__(self, x:Tensor) -> Tensor:
|
||||
x = self.whiten(x).quick_gelu()
|
||||
# ************* HACKS *************
|
||||
x = x.pad((1,0,0,1)) # TODO: this pad should not be here! copied from hlb_cifar10 for speed
|
||||
# ************* HACKS *************
|
||||
x = x.sequential([self.conv_group_1, self.conv_group_2, self.conv_group_3])
|
||||
return self.linear(x.max(axis=(2,3))) * hyp['opt']['scaling_factor']
|
||||
|
||||
if __name__ == "__main__":
|
||||
# *** dataset ***
|
||||
X_train, Y_train, X_test, Y_test = nn.datasets.cifar()
|
||||
# TODO: without this line indexing doesn't fuse!
|
||||
X_train, Y_train, X_test, Y_test = [x.contiguous() for x in [X_train, Y_train, X_test, Y_test]]
|
||||
cifar10_std, cifar10_mean = X_train.float().std_mean(axis=(0, 2, 3))
|
||||
def preprocess(X:Tensor) -> Tensor: return ((X - cifar10_mean.view(1, -1, 1, 1)) / cifar10_std.view(1, -1, 1, 1)).cast(dtypes.default_float)
|
||||
def preprocess(X:Tensor, Y:Tensor) -> Tuple[Tensor, Tensor]:
|
||||
return ((X - cifar10_mean.view(1, -1, 1, 1)) / cifar10_std.view(1, -1, 1, 1)).cast(dtypes.default_float), Y.one_hot(depths['num_classes'])
|
||||
|
||||
# *** model ***
|
||||
model = SpeedyConvNet()
|
||||
state_dict = nn.state.get_state_dict(model)
|
||||
if len(GPUS) > 1:
|
||||
cifar10_std.to_(GPUS)
|
||||
cifar10_mean.to_(GPUS)
|
||||
for x in state_dict.values(): x.to_(GPUS)
|
||||
|
||||
#for k,v in nn.state.torch_load("/tmp/cifar_net.pt").items(): print(k)
|
||||
|
||||
params_bias, params_non_bias = partition(state_dict.items(), lambda x: 'bias' in x[0])
|
||||
opt_bias = nn.optim.SGD([x[1] for x in params_bias], lr=0.01, momentum=.85, nesterov=True, weight_decay=hyp['opt']['bias_decay'])
|
||||
@@ -118,37 +111,40 @@ if __name__ == "__main__":
|
||||
lr_sched_bias = OneCycleLR(opt_bias, max_lr=hyp['opt']['bias_lr'], pct_start=pct_start, div_factor=initial_div_factor, final_div_factor=1./(initial_div_factor*final_lr_ratio), total_steps=total_train_steps)
|
||||
lr_sched_non_bias = OneCycleLR(opt_non_bias, max_lr=hyp['opt']['non_bias_lr'], pct_start=pct_start, div_factor=initial_div_factor, final_div_factor=1./(initial_div_factor*final_lr_ratio), total_steps=total_train_steps)
|
||||
|
||||
def loss_fn(out:Tensor, Y:Tensor) -> Tensor:
|
||||
ret = out.sparse_categorical_crossentropy(Y, reduction='none', label_smoothing=0.2)
|
||||
return ret.mul(hyp['opt']['loss_scale_scaler']*loss_batchsize_scaler).sum().div(hyp['opt']['loss_scale_scaler'])
|
||||
def loss_fn(out, Y):
|
||||
return out.cross_entropy(Y, reduction='none', label_smoothing=0.2).mul(hyp['opt']['loss_scale_scaler']*loss_batchsize_scaler).sum().div(hyp['opt']['loss_scale_scaler'])
|
||||
|
||||
@TinyJit
|
||||
@Tensor.train()
|
||||
def train_step(idxs:Tensor) -> Tensor:
|
||||
X, Y = X_train[idxs], Y_train[idxs]
|
||||
if len(GPUS) > 1:
|
||||
X.shard_(GPUS, axis=0)
|
||||
Y.shard_(GPUS, axis=0)
|
||||
out = model(preprocess(X))
|
||||
with Context(SPLIT_REDUCEOP=0, FUSE_ARANGE=1):
|
||||
X = X_train[idxs]
|
||||
Y = Y_train[idxs].realize(X)
|
||||
X, Y = preprocess(X, Y)
|
||||
out = model(X)
|
||||
loss = loss_fn(out, Y)
|
||||
opt.zero_grad()
|
||||
loss.backward()
|
||||
return (loss / (batchsize*loss_batchsize_scaler)).realize(*opt.schedule_step(),
|
||||
*lr_sched_bias.schedule_step(), *lr_sched_non_bias.schedule_step())
|
||||
opt.step()
|
||||
lr_sched_bias.step()
|
||||
lr_sched_non_bias.step()
|
||||
return loss / (batchsize*loss_batchsize_scaler)
|
||||
|
||||
eval_batchsize = 2500
|
||||
@TinyJit
|
||||
@Tensor.test()
|
||||
def val_step() -> Tuple[Tensor, Tensor]:
|
||||
# TODO with Tensor.no_grad()
|
||||
Tensor.no_grad = True
|
||||
loss, acc = [], []
|
||||
for i in range(0, X_test.size(0), eval_batchsize):
|
||||
X, Y = X_test[i:i+eval_batchsize], Y_test[i:i+eval_batchsize]
|
||||
if len(GPUS) > 1:
|
||||
X.shard_(GPUS, axis=0)
|
||||
Y.shard_(GPUS, axis=0)
|
||||
out = model(preprocess(X))
|
||||
X, Y = preprocess(X_test[i:i+eval_batchsize], Y_test[i:i+eval_batchsize])
|
||||
out = model(X)
|
||||
loss.append(loss_fn(out, Y))
|
||||
acc.append((out.argmax(-1) == Y).sum() / eval_batchsize)
|
||||
return Tensor.stack(*loss).mean() / (batchsize*loss_batchsize_scaler), Tensor.stack(*acc).mean()
|
||||
acc.append((out.argmax(-1).one_hot(depths['num_classes']) * Y).sum() / eval_batchsize)
|
||||
ret = Tensor.stack(*loss).mean() / (batchsize*loss_batchsize_scaler), Tensor.stack(*acc).mean()
|
||||
Tensor.no_grad = False
|
||||
return ret
|
||||
|
||||
np.random.seed(1337)
|
||||
for epoch in range(math.ceil(hyp['misc']['train_epochs'])):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# model based off https://medium.com/data-science/going-beyond-99-mnist-handwritten-digits-recognition-cfff96337392
|
||||
# model based off https://towardsdatascience.com/going-beyond-99-mnist-handwritten-digits-recognition-cfff96337392
|
||||
from typing import List, Callable
|
||||
from tinygrad import Tensor, TinyJit, nn, GlobalCounters
|
||||
from tinygrad.helpers import getenv, colored, trange
|
||||
@@ -34,6 +34,7 @@ if __name__ == "__main__":
|
||||
return loss
|
||||
|
||||
@TinyJit
|
||||
@Tensor.test()
|
||||
def get_test_acc() -> Tensor: return (model(X_test).argmax(axis=1) == Y_test).mean()*100
|
||||
|
||||
test_acc = float('nan')
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
import sys, time
|
||||
from tinygrad import TinyJit, GlobalCounters, fetch, getenv
|
||||
from tinygrad.frontend.onnx import OnnxRunner
|
||||
from extra.onnx_helpers import get_example_inputs, validate
|
||||
|
||||
def load_onnx_model(onnx_file):
|
||||
run_onnx = OnnxRunner(onnx_file)
|
||||
run_onnx_jit = TinyJit(lambda **kwargs: next(iter(run_onnx({k:v.to(None) for k,v in kwargs.items()}).values())), prune=True, optimize=True)
|
||||
return run_onnx_jit, run_onnx.graph_inputs
|
||||
|
||||
if __name__ == "__main__":
|
||||
onnx_file = fetch(sys.argv[1])
|
||||
run_onnx_jit, input_specs = load_onnx_model(onnx_file)
|
||||
print("loaded model")
|
||||
|
||||
for i in range(3):
|
||||
new_inputs = get_example_inputs(input_specs)
|
||||
GlobalCounters.reset()
|
||||
print(f"run {i}")
|
||||
run_onnx_jit(**new_inputs)
|
||||
|
||||
# run 20 times
|
||||
for _ in range(20):
|
||||
new_inputs = get_example_inputs(input_specs)
|
||||
GlobalCounters.reset()
|
||||
st = time.perf_counter()
|
||||
out = run_onnx_jit(**new_inputs)
|
||||
mt = time.perf_counter()
|
||||
val = out.numpy()
|
||||
et = time.perf_counter()
|
||||
print(f"enqueue {(mt-st)*1e3:6.2f} ms -- total run {(et-st)*1e3:6.2f} ms")
|
||||
|
||||
if getenv("ORT"):
|
||||
validate(onnx_file, new_inputs, rtol=1e-3, atol=1e-3)
|
||||
print("model validated")
|
||||
+5
-3
@@ -4,7 +4,7 @@ sys.path.append(os.getcwd())
|
||||
|
||||
from io import StringIO
|
||||
from contextlib import redirect_stdout
|
||||
from tinygrad import Tensor, nn
|
||||
from tinygrad import Tensor, nn, Device, dtypes
|
||||
from tinygrad.helpers import Timing, colored, getenv, fetch
|
||||
from extra.models.llama import Transformer, convert_from_huggingface, fix_bf16
|
||||
from sentencepiece import SentencePieceProcessor
|
||||
@@ -23,6 +23,8 @@ def create_fixed_tokenizer(output_file):
|
||||
# echo -en "write 2+2\nwrite hello world\ny\n" | TEMP=0 python3 examples/coder.py
|
||||
|
||||
if __name__ == "__main__":
|
||||
Tensor.no_grad = True
|
||||
|
||||
# https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B/blob/main/config.json
|
||||
with Timing("create model: "):
|
||||
model = Transformer(4096, 14336, n_heads=32, n_layers=32, norm_eps=1e-5, vocab_size=32002, n_kv_heads=8, max_context=4096, jit=getenv("JIT", 1))
|
||||
@@ -32,8 +34,8 @@ if __name__ == "__main__":
|
||||
part2 = nn.state.torch_load(fetch("https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B/resolve/main/pytorch_model-00002-of-00002.bin?download=true"))
|
||||
|
||||
with Timing("weights -> model: "):
|
||||
nn.state.load_state_dict(model, fix_bf16(convert_from_huggingface(part1, 32, 32, 8)), strict=False)
|
||||
nn.state.load_state_dict(model, fix_bf16(convert_from_huggingface(part2, 32, 32, 8)), strict=False)
|
||||
nn.state.load_state_dict(model, fix_bf16(convert_from_huggingface(part1, model, 32, 8)), strict=False)
|
||||
nn.state.load_state_dict(model, fix_bf16(convert_from_huggingface(part2, model, 32, 8)), strict=False)
|
||||
|
||||
if not os.path.isfile("/tmp/tokenizer.model"): create_fixed_tokenizer("/tmp/tokenizer.model")
|
||||
spp = SentencePieceProcessor(model_file="/tmp/tokenizer.model")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from pathlib import Path
|
||||
from extra.models.efficientnet import EfficientNet
|
||||
from tinygrad.tensor import Tensor
|
||||
from tinygrad.nn.state import get_state_dict, safe_save, safe_load, load_state_dict
|
||||
from tinygrad.nn.state import safe_save
|
||||
from extra.export_model import export_model
|
||||
from tinygrad.helpers import getenv, fetch
|
||||
import ast
|
||||
@@ -9,16 +9,12 @@ import ast
|
||||
if __name__ == "__main__":
|
||||
model = EfficientNet(0)
|
||||
model.load_from_pretrained()
|
||||
dirname = Path(__file__).parent
|
||||
# exporting a model that's loaded from safetensors doesn't work without loading in from safetensors first
|
||||
# loading the state dict from a safetensor file changes the generated kernels
|
||||
if getenv("WEBGPU"):
|
||||
safe_save(get_state_dict(model), (dirname / "net.safetensors").as_posix())
|
||||
load_state_dict(model, safe_load(str(dirname / "net.safetensors")))
|
||||
mode = "clang" if getenv("CPU", "") != "" else "webgpu" if getenv("WEBGPU", "") != "" else ""
|
||||
mode = "clang" if getenv("CLANG", "") != "" else "webgpu" if getenv("WEBGPU", "") != "" else "webgl" if getenv("WEBGL", "") != "" else ""
|
||||
prg, inp_sizes, out_sizes, state = export_model(model, mode, Tensor.randn(1,3,224,224))
|
||||
if getenv("CPU", "") == "":
|
||||
ext = "js" if getenv("WEBGPU", "") != "" else "json"
|
||||
dirname = Path(__file__).parent
|
||||
if getenv("CLANG", "") == "":
|
||||
safe_save(state, (dirname / "net.safetensors").as_posix())
|
||||
ext = "js" if getenv("WEBGPU", "") != "" or getenv("WEBGL", "") != "" else "json"
|
||||
with open(dirname / f"net.{ext}", "w") as text_file:
|
||||
text_file.write(prg)
|
||||
else:
|
||||
@@ -68,6 +64,6 @@ if __name__ == "__main__":
|
||||
else printf("%s\\n", lbls[best_idx]);
|
||||
}""")
|
||||
|
||||
# CPU=1 python3 examples/compile_efficientnet.py | clang -O2 -lm -x c - -o recognize && DEBUG=1 time ./recognize docs/showcase/stable_diffusion_by_tinygrad.jpg
|
||||
# CLANG=1 python3 examples/compile_efficientnet.py | clang -O2 -lm -x c - -o recognize && DEBUG=1 time ./recognize docs/showcase/stable_diffusion_by_tinygrad.jpg
|
||||
# category : 281 (tabby, tabby cat) with 9.452788
|
||||
print('\n'.join(cprog))
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
# An example to compile a small Tensorflow model to extremely portable C code
|
||||
|
||||
import os, sys
|
||||
os.environ["CPU"] = '1'
|
||||
os.environ["CLANG"] = '1'
|
||||
os.environ["JIT"] = '2'
|
||||
|
||||
import numpy as np
|
||||
import subprocess
|
||||
import tensorflow as tf
|
||||
import tf2onnx
|
||||
from tinygrad.frontend.onnx import OnnxRunner
|
||||
from extra.onnx import get_run_onnx
|
||||
from tinygrad.tensor import Tensor
|
||||
from tinygrad.helpers import to_mv
|
||||
from extra.export_model import export_model_clang, compile_net, jit_model
|
||||
|
||||
def get_uncompiled_model2(dataset_size=32, output_size=4):
|
||||
@@ -26,7 +25,7 @@ class TinyOnnx:
|
||||
def __init__(self, keras_model):
|
||||
input_signature = [tf.TensorSpec([1,32], tf.float32, name='x')]
|
||||
onnx_model, _ = tf2onnx.convert.from_keras(keras_model, input_signature, opset=13)
|
||||
self.run_onnx = OnnxRunner(Tensor(onnx_model.SerializeToString(), device="PYTHON"))
|
||||
self.run_onnx = get_run_onnx(onnx_model)
|
||||
|
||||
def forward(self, x):
|
||||
return self.run_onnx({"x": x}, debug=False)['predictions']
|
||||
@@ -48,8 +47,8 @@ def compile_onnx_model(onnx_model):
|
||||
cprog.append("void initialize(float *weights) {")
|
||||
weights = bytes()
|
||||
for name,cl in bufs_to_save.items():
|
||||
cprog.append(f"memcpy({name}, weights + {len(weights)//4}, {cl._buf.size});")
|
||||
weights += bytes(to_mv(cl._buf.va_addr, cl._buf.size))
|
||||
cprog.append(f"memcpy({name}, weights + {len(weights)//4}, {len(cl._buf)*4});")
|
||||
weights += bytes(cl._buf)
|
||||
cprog.append("}")
|
||||
|
||||
# write the weights to disk
|
||||
|
||||
@@ -117,7 +117,7 @@ def tts(
|
||||
stn_tst = text_mapper.get_text(text_to_synthesize, hps.data.add_blank, hps.data.text_cleaners)
|
||||
init_shape = stn_tst.shape
|
||||
assert init_shape[0] < pad_length, "text is too long"
|
||||
x_tst, x_tst_lengths = stn_tst.pad(((0, pad_length - init_shape[0]),), value=1).unsqueeze(0), Tensor([init_shape[0]], dtype=dtypes.int64)
|
||||
x_tst, x_tst_lengths = stn_tst.pad(((0, pad_length - init_shape[0]),), 1).unsqueeze(0), Tensor([init_shape[0]], dtype=dtypes.int64)
|
||||
sid = Tensor([speaker_id], dtype=dtypes.int64) if model_has_multiple_speakers else None
|
||||
|
||||
# Perform inference.
|
||||
@@ -159,6 +159,7 @@ def init_vits(
|
||||
text_mapper = TextMapper(apply_cleaners=True, symbols=symbols)
|
||||
|
||||
# Load the model.
|
||||
Tensor.no_grad = True
|
||||
if seed is not None:
|
||||
Tensor.manual_seed(seed)
|
||||
np.random.seed(seed)
|
||||
@@ -220,6 +221,7 @@ def mp_output_stream(q: mp.Queue, counter: mp.Value, num_channels: int, sample_r
|
||||
if __name__ == "__main__":
|
||||
import nltk
|
||||
nltk.download("punkt")
|
||||
Tensor.no_grad = True
|
||||
# Parse CLI arguments
|
||||
parser = argparse.ArgumentParser("Have a tiny conversation with tinygrad")
|
||||
|
||||
|
||||
+3
-5
@@ -326,12 +326,11 @@ class Flux:
|
||||
return self.final_layer(img, vec) # (N, T, patch_size ** 2 * out_channels)
|
||||
|
||||
# https://github.com/black-forest-labs/flux/blob/main/src/flux/util.py
|
||||
def load_flow_model(name:str, model_path:str):
|
||||
def load_flow_model(name:str):
|
||||
# Loading Flux
|
||||
print("Init model")
|
||||
model = Flux(guidance_embed=(name != "flux-schnell"))
|
||||
if not model_path: model_path = fetch(urls[name])
|
||||
state_dict = {k.replace("scale", "weight"): v for k, v in safe_load(model_path).items()}
|
||||
state_dict = {k.replace("scale", "weight"): v for k, v in safe_load(fetch(urls[name])).items()}
|
||||
load_state_dict(model, state_dict)
|
||||
return model
|
||||
|
||||
@@ -421,7 +420,6 @@ if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Run Flux.1", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
|
||||
parser.add_argument("--name", type=str, default="flux-schnell", help="Name of the model to load")
|
||||
parser.add_argument("--model_path", type=str, default="", help="path of the model file")
|
||||
parser.add_argument("--width", type=int, default=512, help="width of the sample in pixels (should be a multiple of 16)")
|
||||
parser.add_argument("--height", type=int, default=512, help="height of the sample in pixels (should be a multiple of 16)")
|
||||
parser.add_argument("--seed", type=int, default=None, help="Set a seed for sampling")
|
||||
@@ -463,7 +461,7 @@ if __name__ == "__main__":
|
||||
del T5, clip
|
||||
|
||||
# load model
|
||||
model = load_flow_model(args.name, args.model_path)
|
||||
model = load_flow_model(args.name)
|
||||
|
||||
# denoise initial noise
|
||||
x = denoise(model, **inp, timesteps=timesteps, guidance=args.guidance)
|
||||
|
||||
+19
-51
@@ -1,13 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
import os, argparse, contextlib
|
||||
from typing import Optional, Union
|
||||
with contextlib.suppress(ImportError): import tiktoken
|
||||
from tinygrad import Tensor, TinyJit, Device, GlobalCounters, Variable, dtypes
|
||||
from tinygrad.uop.ops import UOp
|
||||
import argparse
|
||||
import numpy as np
|
||||
import tiktoken
|
||||
from tinygrad import Tensor, TinyJit, Device, GlobalCounters, Variable
|
||||
from tinygrad.ops import UOp
|
||||
from tinygrad.helpers import Timing, DEBUG, JIT, getenv, fetch, colored, trange
|
||||
from tinygrad.nn import Embedding, Linear, LayerNorm
|
||||
from tinygrad.nn.state import gguf_load, torch_load, load_state_dict, get_state_dict
|
||||
from extra.bench_log import BenchEvent, WallTimeEvent
|
||||
from tinygrad.nn.state import torch_load, load_state_dict, get_state_dict
|
||||
|
||||
MAX_CONTEXT = getenv("MAX_CONTEXT", 128)
|
||||
HALF = getenv("HALF")
|
||||
@@ -85,10 +85,7 @@ class Transformer:
|
||||
seqlen = tokens.shape[1]
|
||||
tok_emb = self.wte(tokens)
|
||||
|
||||
# not symbolic when consuming the prompt
|
||||
selected_pos = (0, seqlen) if start_pos.val == 0 else (start_pos, start_pos+1)
|
||||
pos_emb = self.wpe(self.allpos.shrink((None, selected_pos)))
|
||||
|
||||
pos_emb = self.wpe(self.allpos.shrink((None, (start_pos, start_pos+seqlen))))
|
||||
h = tok_emb + pos_emb
|
||||
|
||||
if HALF: h = h.half()
|
||||
@@ -138,44 +135,14 @@ class GPT2:
|
||||
# lm head and wte are tied
|
||||
weights['lm_head.weight'] = weights['wte.weight']
|
||||
|
||||
with WallTimeEvent(BenchEvent.LOAD_WEIGHTS):
|
||||
load_state_dict(model, weights)
|
||||
load_state_dict(model, weights)
|
||||
|
||||
if HALF:
|
||||
for l in get_state_dict(model).values():
|
||||
l.replace(l.half().realize())
|
||||
if HALF:
|
||||
for l in get_state_dict(model).values():
|
||||
l.replace(l.half().realize())
|
||||
|
||||
return GPT2(model, tokenizer)
|
||||
|
||||
@staticmethod
|
||||
def build_gguf(model_size: str):
|
||||
q_type = model_size[len("gpt2_gguf_"):].upper()
|
||||
fn = fetch(f"https://huggingface.co/PrunaAI/gpt2-GGUF-smashed/resolve/main/gpt2.{q_type}.gguf?download=true")
|
||||
gguf_tensor = Tensor.empty(os.stat(fn).st_size, dtype=dtypes.uint8, device=f"disk:{fn}").to(Device.DEFAULT)
|
||||
kv_data, state_dict = gguf_load(gguf_tensor)
|
||||
|
||||
gpt2_params = {
|
||||
"dim": kv_data["gpt2.embedding_length"], "n_heads": kv_data["gpt2.attention.head_count"],
|
||||
"n_layers": kv_data["gpt2.block_count"], "norm_eps": kv_data["gpt2.attention.layer_norm_epsilon"],
|
||||
"vocab_size": VOCAB_SIZE, "max_seq_len": kv_data["gpt2.context_length"],
|
||||
}
|
||||
def _remap_gguf_key(key: str):
|
||||
replaces = [
|
||||
("blk.", "h."), (".attn_qkv.bias", ".attn.c_attn.bias"), (".attn_qkv.weight", ".attn.c_attn.weight"),
|
||||
(".ffn_norm.bias", ".ln_2.bias"), (".ffn_norm.weight", ".ln_2.weight"), (".attn_norm.bias", ".ln_1.bias"),
|
||||
(".attn_norm.weight", ".ln_1.weight"), (".attn_output.bias", ".attn.c_proj.bias"), (".attn_output.weight", ".attn.c_proj.weight"),
|
||||
(".ffn_up.bias", ".mlp.c_fc.bias"), (".ffn_up.weight", ".mlp.c_fc.weight"), (".ffn_down.bias", ".mlp.c_proj.bias"),
|
||||
(".ffn_down.weight", ".mlp.c_proj.weight"), ("token_embd.weight", "wte.weight"), ("output.weight", "lm_head.weight"),
|
||||
("output_norm.bias", "ln_f.bias"), ("output_norm.weight", "ln_f.weight"), ("position_embd.weight", "wpe.weight"),
|
||||
]
|
||||
for ostr, ns in replaces: key = key.replace(ostr, ns)
|
||||
return key
|
||||
state_dict = { _remap_gguf_key(k): v for k, v in state_dict.items() }
|
||||
model = Transformer(**gpt2_params)
|
||||
with WallTimeEvent(BenchEvent.LOAD_WEIGHTS):
|
||||
load_state_dict(model, state_dict)
|
||||
return GPT2(model, tiktoken.get_encoding("gpt2"))
|
||||
|
||||
def __init__(self, model, tokenizer):
|
||||
self.model = model
|
||||
self.tokenizer = tokenizer
|
||||
@@ -191,12 +158,11 @@ class GPT2:
|
||||
with Timing("ran model in ", on_exit=(lambda et: (f", {(GlobalCounters.time_sum_s-st)*1e3:.2f} ms on GPU" if DEBUG>=2 else "")+
|
||||
f", {GlobalCounters.global_ops*1e-9:.2f} GOPS, {GlobalCounters.global_mem*1e-9:.2f} GB"+
|
||||
(f", {GlobalCounters.global_mem*1e-9/(GlobalCounters.time_sum_s-st):.2f} GB/s" if DEBUG>=2 else "")) if DEBUG else None, enabled=timing):
|
||||
with WallTimeEvent(BenchEvent.STEP):
|
||||
if batch_size == 1 and len(toks[0][start_pos:]) == 1:
|
||||
tokens = Variable("tokens", 0, VOCAB_SIZE-1).bind(toks[0][start_pos])
|
||||
else:
|
||||
tokens = Tensor([x[start_pos:] for x in toks])
|
||||
tok = self.model(tokens, Variable("start_pos", 1 if start_pos else 0, MAX_CONTEXT-1).bind(start_pos), temperature).tolist()
|
||||
if batch_size == 1 and len(toks[0][start_pos:]) == 1:
|
||||
tokens = Variable("tokens", 0, VOCAB_SIZE).bind(toks[0][start_pos])
|
||||
else:
|
||||
tokens = Tensor([x[start_pos:] for x in toks])
|
||||
tok = self.model(tokens, Variable("start_pos", 1 if start_pos else 0, MAX_CONTEXT).bind(start_pos), temperature).numpy().tolist()
|
||||
start_pos = len(toks[0])
|
||||
for i,t in enumerate(tok): toks[i].append(t)
|
||||
return [self.tokenizer.decode(x) for x in toks]
|
||||
@@ -204,6 +170,7 @@ class GPT2:
|
||||
# **** main code ****
|
||||
|
||||
if __name__ == "__main__":
|
||||
Tensor.no_grad = True
|
||||
print(f"using {Device.DEFAULT} backend")
|
||||
default_prompt = "What is the answer to life, the universe, and everything?"
|
||||
|
||||
@@ -221,9 +188,10 @@ if __name__ == "__main__":
|
||||
|
||||
if args.seed is not None:
|
||||
Tensor.manual_seed(args.seed)
|
||||
np.random.seed(args.seed)
|
||||
|
||||
print(f"using {args.model_size}")
|
||||
gpt2 = GPT2.build_gguf(args.model_size) if args.model_size.startswith("gpt2_gguf_") else GPT2.build(args.model_size)
|
||||
gpt2 = GPT2.build(args.model_size)
|
||||
|
||||
if args.benchmark != -1:
|
||||
gpt2.model(Tensor.rand(args.batch_size, args.benchmark), Variable("a", 0, MAX_CONTEXT).bind(0)).realize()
|
||||
|
||||
+20
-19
@@ -1,15 +1,15 @@
|
||||
from typing import List, Tuple
|
||||
from extra.models.resnet import ResNet50
|
||||
from extra.mcts_search import mcts_search
|
||||
from examples.mlperf.helpers import get_mlperf_bert_model
|
||||
from tinygrad import Tensor, Device, dtypes, nn
|
||||
from tinygrad.opt.kernel import Kernel
|
||||
from tinygrad.opt.heuristic import hand_coded_optimizations
|
||||
from tinygrad.uop.ops import Ops, sym_infer
|
||||
from tinygrad.codegen.kernel import Kernel
|
||||
from tinygrad.ops import UOps
|
||||
from tinygrad.device import Compiled
|
||||
from tinygrad.opt.search import beam_search, bufs_from_lin
|
||||
from tinygrad.engine.schedule import create_schedule
|
||||
from tinygrad.engine.search import time_linearizer, beam_search, bufs_from_lin
|
||||
from tinygrad.helpers import DEBUG, ansilen, getenv, colored, TRACEMETA
|
||||
from extra.optimization.helpers import time_linearizer
|
||||
from tinygrad.engine.realize import get_program
|
||||
from tinygrad.shape.symbolic import sym_infer
|
||||
|
||||
def get_sched_resnet():
|
||||
mdl = ResNet50()
|
||||
@@ -19,12 +19,12 @@ def get_sched_resnet():
|
||||
# run model twice to get only what changes, these are the kernels of the model
|
||||
for _ in range(2):
|
||||
out = mdl(Tensor.empty(BS, 3, 224, 224))
|
||||
targets = [out]
|
||||
targets = [out.lazydata]
|
||||
if getenv("BACKWARD"):
|
||||
optim.zero_grad()
|
||||
out.sparse_categorical_crossentropy(Tensor.empty(BS, dtype=dtypes.int)).backward()
|
||||
targets += [x for x in optim.schedule_step()]
|
||||
sched = Tensor.schedule(*targets)
|
||||
targets += [x.lazydata for x in optim.schedule_step()]
|
||||
sched = create_schedule(targets)
|
||||
print(f"schedule length {len(sched)}")
|
||||
return sched
|
||||
|
||||
@@ -43,16 +43,17 @@ def get_sched_bert():
|
||||
next_sentence_labels = Tensor.empty((BS, 1), dtype=dtypes.float32)
|
||||
|
||||
# run model twice to get only what changes, these are the kernels of the model
|
||||
seen = set()
|
||||
for _ in range(2):
|
||||
lm_logits, seq_relationship_logits = mdl(input_ids, attention_mask, masked_positions, segment_ids)
|
||||
targets = [lm_logits, seq_relationship_logits]
|
||||
targets = [lm_logits.lazydata, seq_relationship_logits.lazydata]
|
||||
if getenv("BACKWARD"):
|
||||
optim.zero_grad()
|
||||
loss = mdl.loss(lm_logits, seq_relationship_logits, masked_lm_ids, masked_lm_weights, next_sentence_labels)
|
||||
# ignore grad norm and loss scaler for now
|
||||
loss.backward()
|
||||
targets += [x for x in optim.schedule_step()]
|
||||
sched = Tensor.schedule(*targets)
|
||||
targets += [x.lazydata for x in optim.schedule_step()]
|
||||
sched = create_schedule(targets)
|
||||
print(f"schedule length {len(sched)}")
|
||||
return sched
|
||||
|
||||
@@ -66,7 +67,7 @@ if __name__ == "__main__":
|
||||
print(f"optimizing for {Device.DEFAULT}")
|
||||
|
||||
sched = globals()[f"get_sched_{getenv('MODEL', 'resnet')}"]()
|
||||
sched = [x for x in sched if x.ast.op is Ops.SINK]
|
||||
sched = [x for x in sched if x.ast.op is UOps.SINK]
|
||||
|
||||
# focus on one kernel
|
||||
if getenv("KERNEL", -1) >= 0: sched = sched[getenv("KERNEL", -1):getenv("KERNEL", -1)+1]
|
||||
@@ -81,11 +82,11 @@ if __name__ == "__main__":
|
||||
rawbufs = bufs_from_lin(Kernel(si.ast))
|
||||
|
||||
# "linearize" the op into uops in different ways
|
||||
lins: list[tuple[Kernel, str]] = []
|
||||
lins: List[Tuple[Kernel, str]] = []
|
||||
|
||||
# always try hand coded opt
|
||||
lin = Kernel(si.ast, opts=device.renderer)
|
||||
lin.apply_opts(hand_coded_optimizations(lin))
|
||||
lin.hand_coded_optimizations()
|
||||
lins.append((lin, "HC"))
|
||||
|
||||
# maybe try tensor cores
|
||||
@@ -109,7 +110,7 @@ if __name__ == "__main__":
|
||||
choices = []
|
||||
for lin, nm in lins:
|
||||
tm = time_linearizer(lin, rawbufs, allow_test_size=False, cnt=10, disable_cache=True)
|
||||
ops = (prg:=get_program(lin.get_optimized_ast(), lin.opts)).estimates.ops
|
||||
ops = (prg:=lin.to_program()).op_estimate
|
||||
gflops = sym_infer(ops, {k:k.min for k in lin.ast.variables()})*1e-9/tm
|
||||
choices.append((tm, gflops, lin, prg, nm))
|
||||
|
||||
@@ -122,12 +123,12 @@ if __name__ == "__main__":
|
||||
if getenv("SRC"):
|
||||
print(si.ast)
|
||||
print(lin.applied_opts)
|
||||
print(get_program(lin.get_optimized_ast(), lin.opts).src)
|
||||
print(lin.to_program().src)
|
||||
total_tm += tm
|
||||
running_gflops += gflops * tm
|
||||
if (key := str([str(m) for m in si.metadata])) not in usage: usage[key] = (0, 0)
|
||||
if (key := str([str(m) for m in si.metadata] if si.metadata is not None else None)) not in usage: usage[key] = (0, 0)
|
||||
usage[key] = (usage[key][0] + tm, usage[key][1] + 1)
|
||||
print(f"*** {total_tm*1000:7.2f} ms : kernel {i:2d} {lin.name+' '*(37-ansilen(lin.name))} {str(prg.global_size):18s} {str(prg.local_size):12s} takes {tm*1000:7.2f} ms, {gflops:6.0f} GFLOPS {[repr(m) if TRACEMETA >= 2 else str(m) for m in si.metadata]}")
|
||||
print(f"*** {total_tm*1000:7.2f} ms : kernel {i:2d} {lin.name+' '*(37-ansilen(lin.name))} {str(prg.global_size):18s} {str(prg.local_size):12s} takes {tm*1000:7.2f} ms, {gflops:6.0f} GFLOPS {[repr(m) if TRACEMETA >= 2 else str(m) for m in si.metadata] if si.metadata is not None else ''}")
|
||||
print(f"******* total {total_tm*1000:.2f} ms, {running_gflops/total_tm:6.0f} GFLOPS")
|
||||
print("usage:")
|
||||
for k in sorted(usage, key=lambda x: -usage[x][0])[:10]:
|
||||
|
||||
+53
-54
@@ -7,11 +7,11 @@ import random, time
|
||||
import numpy as np
|
||||
from typing import Optional
|
||||
from extra.lr_scheduler import OneCycleLR
|
||||
from tinygrad import nn, dtypes, Tensor, Device, GlobalCounters, TinyJit, Variable
|
||||
from tinygrad.nn.state import get_state_dict
|
||||
from tinygrad import nn, dtypes, Tensor, Device, GlobalCounters, TinyJit
|
||||
from tinygrad.nn.state import get_state_dict, get_parameters
|
||||
from tinygrad.nn import optim
|
||||
from tinygrad.helpers import Context, BEAM, WINO, getenv, colored, prod
|
||||
from extra.bench_log import BenchEvent, WallTimeEvent
|
||||
from tinygrad.multi import MultiLazyBuffer
|
||||
|
||||
cifar_mean = [0.4913997551666284, 0.48215855929893703, 0.4465309133731618]
|
||||
cifar_std = [0.24703225141799082, 0.24348516474564, 0.26158783926049628]
|
||||
@@ -35,6 +35,8 @@ class UnsyncedBatchNorm:
|
||||
self.num_batches_tracked = Tensor.zeros(1, dtype=dtypes.int, requires_grad=False)
|
||||
|
||||
def __call__(self, x:Tensor):
|
||||
if isinstance(x.lazydata, MultiLazyBuffer): assert x.lazydata.axis is None or x.lazydata.axis == 0 and len(x.lazydata.lbs) == self.num_devices
|
||||
|
||||
xr = x.reshape(self.num_devices, -1, *x.shape[1:]).cast(dtypes.float32)
|
||||
batch_mean, batch_invstd = self.calc_stats(xr)
|
||||
ret = xr.batchnorm(
|
||||
@@ -112,13 +114,13 @@ class SpeedyResNet:
|
||||
def __call__(self, x, training=True):
|
||||
# pad to 32x32 because whitening conv creates 31x31 images that are awfully slow to compute with
|
||||
# TODO: remove the pad but instead let the kernel optimize itself
|
||||
forward = lambda x: x.conv2d(self.whitening).pad((1,0,0,1)).sequential(self.net)
|
||||
forward = lambda x: x.conv2d(self.whitening).pad2d((1,0,0,1)).sequential(self.net)
|
||||
return forward(x) if training else (forward(x) + forward(x[..., ::-1])) / 2.
|
||||
|
||||
# hyper-parameters were exactly the same as the original repo
|
||||
bias_scaler = 58
|
||||
hyp = {
|
||||
'seed' : 200,
|
||||
'seed' : 209,
|
||||
'opt': {
|
||||
'bias_lr': 1.76 * bias_scaler/512,
|
||||
'non_bias_lr': 1.76 / 512,
|
||||
@@ -145,7 +147,6 @@ hyp = {
|
||||
},
|
||||
}
|
||||
|
||||
@Context(FUSE_ARANGE=getenv("FUSE_ARANGE", 1))
|
||||
def train_cifar():
|
||||
|
||||
def set_seed(seed):
|
||||
@@ -202,37 +203,24 @@ def train_cifar():
|
||||
idx_y = Tensor.arange(H, dtype=dtypes.int32).reshape((1,1,H,1))
|
||||
return (idx_x >= low_x) * (idx_x < (low_x + mask_size)) * (idx_y >= low_y) * (idx_y < (low_y + mask_size))
|
||||
|
||||
# Similar, but different enough.
|
||||
def make_random_crop_indices(shape, mask_size) -> Tensor:
|
||||
BS, _, H, W = shape
|
||||
low_x = Tensor.randint(BS, low=0, high=W-mask_size).reshape(BS,1,1,1)
|
||||
low_y = Tensor.randint(BS, low=0, high=H-mask_size).reshape(BS,1,1,1)
|
||||
idx_x = Tensor.arange(mask_size, dtype=dtypes.int32).reshape((1,1,1,mask_size))
|
||||
idx_y = Tensor.arange(mask_size, dtype=dtypes.int32).reshape((1,1,mask_size,1))
|
||||
return low_x, low_y, idx_x, idx_y
|
||||
|
||||
def random_crop(X:Tensor, crop_size=32):
|
||||
Xs, Ys, Xi, Yi = make_random_crop_indices(X.shape, crop_size)
|
||||
return X.gather(-1, (Xs + Xi).expand(-1, 3, X.shape[2], -1)).gather(-2, ((Ys+Yi).expand(-1, 3, crop_size, crop_size)))
|
||||
mask = make_square_mask(X.shape, crop_size)
|
||||
mask = mask.expand((-1,3,-1,-1))
|
||||
X_cropped = Tensor(X.numpy()[mask.numpy()])
|
||||
return X_cropped.reshape((-1, 3, crop_size, crop_size))
|
||||
|
||||
def cutmix(X, Y, order, mask_size=3):
|
||||
def cutmix(X:Tensor, Y:Tensor, mask_size=3):
|
||||
# fill the square with randomly selected images from the same batch
|
||||
mask = make_square_mask(X.shape, mask_size)
|
||||
X_patch, Y_patch = X[order], Y[order]
|
||||
order = list(range(0, X.shape[0]))
|
||||
random.shuffle(order)
|
||||
X_patch = Tensor(X.numpy()[order], device=X.device, dtype=X.dtype)
|
||||
Y_patch = Tensor(Y.numpy()[order], device=Y.device, dtype=Y.dtype)
|
||||
X_cutmix = mask.where(X_patch, X)
|
||||
mix_portion = float(mask_size**2)/(X.shape[-2]*X.shape[-1])
|
||||
Y_cutmix = mix_portion * Y_patch + (1. - mix_portion) * Y
|
||||
return X_cutmix, Y_cutmix
|
||||
|
||||
@TinyJit
|
||||
def augmentations(X:Tensor, Y:Tensor):
|
||||
perms = Tensor.randperm(X.shape[0], device=X.device) # We reuse perms for cutmix, because they are expensivne to generate
|
||||
if getenv("RANDOM_CROP", 1):
|
||||
X = random_crop(X, crop_size=32)
|
||||
if getenv("RANDOM_FLIP", 1):
|
||||
X = (Tensor.rand(X.shape[0],1,1,1) < 0.5).where(X.flip(-1), X) # flip LR
|
||||
X, Y = X[perms], Y[perms]
|
||||
return X, Y, *cutmix(X, Y, perms, mask_size=hyp['net']['cutmix_size'])
|
||||
|
||||
# the operations that remain inside batch fetcher is the ones that involves random operations
|
||||
def fetch_batches(X_in:Tensor, Y_in:Tensor, BS:int, is_train:bool):
|
||||
step, epoch = 0, 0
|
||||
@@ -240,16 +228,28 @@ def train_cifar():
|
||||
st = time.monotonic()
|
||||
X, Y = X_in, Y_in
|
||||
if is_train:
|
||||
X, Y, X_cm, Y_cm = augmentations(X, Y)
|
||||
if getenv("CUTMIX", 1) and step >= hyp['net']['cutmix_steps']: X, Y = X_cm, Y_cm
|
||||
# TODO: these are not jitted
|
||||
if getenv("RANDOM_CROP", 1):
|
||||
X = random_crop(X, crop_size=32)
|
||||
if getenv("RANDOM_FLIP", 1):
|
||||
X = (Tensor.rand(X.shape[0],1,1,1) < 0.5).where(X.flip(-1), X) # flip LR
|
||||
if getenv("CUTMIX", 1):
|
||||
if step >= hyp['net']['cutmix_steps']:
|
||||
X, Y = cutmix(X, Y, mask_size=hyp['net']['cutmix_size'])
|
||||
order = list(range(0, X.shape[0]))
|
||||
random.shuffle(order)
|
||||
X, Y = X.numpy()[order], Y.numpy()[order]
|
||||
else:
|
||||
X, Y = X.numpy(), Y.numpy()
|
||||
et = time.monotonic()
|
||||
print(f"shuffling {'training' if is_train else 'test'} dataset in {(et-st)*1e3:.2f} ms ({epoch=})")
|
||||
|
||||
vi = Variable("i", 0, (full_batches := (X.shape[0] // BS) * BS) - BS)
|
||||
for i in range(0, full_batches, BS):
|
||||
for i in range(0, X.shape[0], BS):
|
||||
# pad the last batch # TODO: not correct for test
|
||||
batch_end = min(i+BS, Y.shape[0])
|
||||
x = Tensor(X[batch_end-BS:batch_end], device=X_in.device, dtype=X_in.dtype)
|
||||
y = Tensor(Y[batch_end-BS:batch_end], device=Y_in.device, dtype=Y_in.dtype)
|
||||
step += 1
|
||||
vib = vi.bind(i)
|
||||
yield X[vib:vib+BS], Y[vib:vib+BS]
|
||||
yield x, y
|
||||
epoch += 1
|
||||
if not is_train: break
|
||||
|
||||
@@ -269,10 +269,13 @@ def train_cifar():
|
||||
|
||||
@TinyJit
|
||||
def update(self, net, decay):
|
||||
# TODO with Tensor.no_grad()
|
||||
Tensor.no_grad = True
|
||||
for net_ema_param, (param_name, net_param) in zip(get_state_dict(self.net_ema).values(), get_state_dict(net).items()):
|
||||
# batchnorm currently is not being tracked
|
||||
if not ("num_batches_tracked" in param_name) and not ("running" in param_name):
|
||||
net_ema_param.assign(net_ema_param.detach()*decay + net_param.detach()*(1.-decay)).realize()
|
||||
Tensor.no_grad = False
|
||||
|
||||
set_seed(getenv('SEED', hyp['seed']))
|
||||
|
||||
@@ -395,23 +398,20 @@ def train_cifar():
|
||||
if STEPS == 0 or i == STEPS: break
|
||||
|
||||
GlobalCounters.reset()
|
||||
X, Y = next(batcher)
|
||||
if len(GPUS) > 1:
|
||||
X.shard_(GPUS, axis=0)
|
||||
Y.shard_(GPUS, axis=0)
|
||||
|
||||
with WallTimeEvent(BenchEvent.STEP):
|
||||
X, Y = next(batcher)
|
||||
if len(GPUS) > 1:
|
||||
X.shard_(GPUS, axis=0)
|
||||
Y.shard_(GPUS, axis=0)
|
||||
|
||||
with Context(BEAM=getenv("LATEBEAM", BEAM.value), WINO=getenv("LATEWINO", WINO.value)):
|
||||
loss = train_step_jitted(model, optim.OptimizerGroup(opt_bias, opt_non_bias), [lr_sched_bias, lr_sched_non_bias], X, Y)
|
||||
et = time.monotonic()
|
||||
loss_cpu = loss.numpy()
|
||||
# EMA for network weights
|
||||
if getenv("EMA") and i > hyp['ema']['steps'] and (i+1) % hyp['ema']['every_n_steps'] == 0:
|
||||
if model_ema is None:
|
||||
model_ema = modelEMA(W, model)
|
||||
model_ema.update(model, Tensor([projected_ema_decay_val*(i/STEPS)**hyp['ema']['decay_pow']]))
|
||||
|
||||
with Context(BEAM=getenv("LATEBEAM", BEAM.value), WINO=getenv("LATEWINO", WINO.value)):
|
||||
loss = train_step_jitted(model, optim.OptimizerGroup(opt_bias, opt_non_bias), [lr_sched_bias, lr_sched_non_bias], X, Y)
|
||||
et = time.monotonic()
|
||||
loss_cpu = loss.numpy()
|
||||
# EMA for network weights
|
||||
if getenv("EMA") and i > hyp['ema']['steps'] and (i+1) % hyp['ema']['every_n_steps'] == 0:
|
||||
if model_ema is None:
|
||||
model_ema = modelEMA(W, model)
|
||||
model_ema.update(model, Tensor([projected_ema_decay_val*(i/STEPS)**hyp['ema']['decay_pow']]))
|
||||
cl = time.monotonic()
|
||||
device_str = loss.device if isinstance(loss.device, str) else f"{loss.device[0]} * {len(loss.device)}"
|
||||
# 53 221.74 ms run, 2.22 ms python, 219.52 ms CL, 803.39 loss, 0.000807 LR, 4.66 GB used, 3042.49 GFLOPS, 674.65 GOPS
|
||||
@@ -427,5 +427,4 @@ def train_cifar():
|
||||
raise ValueError(colored(f"{eval_acc_pct=} < {target}", "red"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
with WallTimeEvent(BenchEvent.FULL):
|
||||
train_cifar()
|
||||
train_cifar()
|
||||
|
||||
@@ -17,6 +17,7 @@ canvas { display: none; }
|
||||
* { text-align: center; font-family: monospace; }
|
||||
</style>
|
||||
<title>tinygrad has WebGPU</title>
|
||||
<script src="./net.js"></script>
|
||||
<link rel="icon" type="image/x-icon" href="https://raw.githubusercontent.com/tinygrad/tinygrad/master/docs/logo.png">
|
||||
</head>
|
||||
<body>
|
||||
@@ -45,10 +46,7 @@ canvas { display: none; }
|
||||
const getDevice = async () => {
|
||||
if (!navigator.gpu) error("WebGPU not supported.");
|
||||
const adapter = await navigator.gpu.requestAdapter();
|
||||
return await adapter.requestDevice({
|
||||
requiredFeatures: ["shader-f16"],
|
||||
powerPreference: "high-performance"
|
||||
});
|
||||
return await adapter.requestDevice();
|
||||
};
|
||||
|
||||
const timer = async (func, label = "") => {
|
||||
@@ -63,6 +61,8 @@ canvas { display: none; }
|
||||
|
||||
const getLabels = async () => (await fetch("https://raw.githubusercontent.com/anishathalye/imagenet-simple-labels/master/imagenet-simple-labels.json")).json();
|
||||
|
||||
const getSavetensorBuffer = async () => new Uint8Array(await (await fetch("./net.safetensors")).arrayBuffer());
|
||||
|
||||
const reorderChannelsAndRemoveAlpha = (data) => {
|
||||
const out = [];
|
||||
let i = 0;
|
||||
@@ -97,9 +97,9 @@ canvas { display: none; }
|
||||
try {
|
||||
resultText.innerHTML = "loading..."
|
||||
labels = await getLabels();
|
||||
const safetensor = await getSavetensorBuffer();
|
||||
const device = await getDevice();
|
||||
const model = (await import("../../net.js")).default;
|
||||
net = await timer(() => model.load(device, '../../net.safetensors'), "(compilation)");
|
||||
net = await timer(() => setupNet(device, safetensor), "(compilation)");
|
||||
resultText.innerHTML = "ready"
|
||||
} catch (e) {
|
||||
error(e)
|
||||
+45
-50
@@ -6,6 +6,8 @@
|
||||
from pathlib import Path
|
||||
from typing import List, Optional
|
||||
import argparse, json
|
||||
import numpy as np
|
||||
np.set_printoptions(linewidth=200)
|
||||
from tinygrad import Tensor, Device, GlobalCounters, nn
|
||||
from tinygrad.helpers import Context, Timing, Profiling, DEBUG, JIT, getenv, colored
|
||||
from tinygrad.nn.state import safe_load, torch_load, load_state_dict, get_parameters
|
||||
@@ -13,7 +15,6 @@ from extra.models.llama import Transformer, convert_from_huggingface, fix_bf16
|
||||
from sentencepiece import SentencePieceProcessor
|
||||
import tiktoken, sys
|
||||
from tiktoken.load import load_tiktoken_bpe
|
||||
from extra.bench_log import BenchEvent, WallTimeEvent
|
||||
|
||||
MAX_CONTEXT = getenv("MAX_CONTEXT", 4096)
|
||||
|
||||
@@ -207,42 +208,40 @@ class LLaMa:
|
||||
|
||||
model = Transformer(**params["args"], linear=linear, max_context=MAX_CONTEXT, jit=bool(JIT))
|
||||
|
||||
with WallTimeEvent(BenchEvent.LOAD_WEIGHTS):
|
||||
if model_path.is_dir():
|
||||
weights = concat_weights([load(filename) for filename in [f"{model_path}/consolidated.{i:02d}.pth" for i in range(params["files"])]], device[0] if isinstance(device, tuple) else device)
|
||||
else:
|
||||
weights = load(str(model_path))
|
||||
if "model.embed_tokens.weight" in weights:
|
||||
weights = convert_from_huggingface(weights, params["args"]["n_layers"], params["args"]["n_heads"], params["args"].get("n_kv_heads", params["args"]["n_heads"]))
|
||||
if model_path.is_dir():
|
||||
weights = concat_weights([load(filename) for filename in [f"{model_path}/consolidated.{i:02d}.pth" for i in range(params["files"])]], device[0] if isinstance(device, tuple) else device)
|
||||
else:
|
||||
weights = load(str(model_path))
|
||||
if "model.embed_tokens.weight" in weights:
|
||||
weights = convert_from_huggingface(weights, model, params["args"]["n_heads"], params["args"].get("n_kv_heads", params["args"]["n_heads"]))
|
||||
|
||||
weights = fix_bf16(weights)
|
||||
weights = fix_bf16(weights)
|
||||
|
||||
# prevent tracking model weights
|
||||
# this is a part of a larger problem with BUFFER UOps and gc in TRACK_MATCH_STATS=2
|
||||
with Context(BEAM=0, TRACK_MATCH_STATS=0):
|
||||
# quantize
|
||||
if quantize is not None:
|
||||
weights = linear.quantize(weights, device)
|
||||
for _,v in weights.items(): v.realize()
|
||||
with Context(BEAM=0):
|
||||
# quantize
|
||||
if quantize is not None:
|
||||
weights = linear.quantize(weights, device)
|
||||
for _,v in weights.items(): v.realize()
|
||||
|
||||
# shard
|
||||
if isinstance(device, tuple):
|
||||
for k,v in nn.state.get_state_dict(model).items():
|
||||
if 'scale' in k: v.shard_(device, axis=None) # from quantized
|
||||
elif '.attention.' in k:
|
||||
if getenv("SHARD_KVCACHE") and ('.wq.' in k or '.wk.' in k or '.wv.' in k): v.shard_(device, axis=0)
|
||||
else: v.shard_(device, axis=-1)
|
||||
elif '.feed_forward.w1.' in k: v.shard_(device, axis=0)
|
||||
elif '.feed_forward.w3.' in k: v.shard_(device, axis=0)
|
||||
elif '.feed_forward.' in k: v.shard_(device, axis=-1)
|
||||
elif 'tok_embeddings.weight' in k: v.shard_(device, axis=0)
|
||||
elif 'output.weight' in k: v.shard_(device, axis=-1)
|
||||
#elif k.endswith('.weight'): v.shard_(device, axis=-1)
|
||||
#elif 'norm.' in k: v.shard_(device, axis=-1)
|
||||
else: v.shard_(device, axis=None)
|
||||
# shard
|
||||
if isinstance(device, tuple):
|
||||
for k,v in nn.state.get_state_dict(model).items():
|
||||
if 'scale' in k: v.shard_(device, axis=None) # from quantized
|
||||
elif '.attention.' in k:
|
||||
if getenv("SHARD_KVCACHE") and ('.wq.' in k or '.wk.' in k or '.wv.' in k): v.shard_(device, axis=0)
|
||||
else: v.shard_(device, axis=-1)
|
||||
elif '.feed_forward.w1.' in k: v.shard_(device, axis=0)
|
||||
elif '.feed_forward.w3.' in k: v.shard_(device, axis=0)
|
||||
elif '.feed_forward.' in k: v.shard_(device, axis=-1)
|
||||
elif 'tok_embeddings.weight' in k: v.shard_(device, axis=0)
|
||||
elif 'output.weight' in k: v.shard_(device, axis=-1)
|
||||
#elif k.endswith('.weight'): v.shard_(device, axis=-1)
|
||||
#elif 'norm.' in k: v.shard_(device, axis=-1)
|
||||
else: v.shard_(device, axis=None)
|
||||
#print(k, v.shape, v.lazydata.axis)
|
||||
|
||||
# replace weights in model
|
||||
load_state_dict(model, weights, strict=False, consume=True)
|
||||
# replace weights in model
|
||||
load_state_dict(model, weights, strict=False, consume=True)
|
||||
|
||||
return LLaMa(model, tokenizer)
|
||||
|
||||
@@ -251,8 +250,6 @@ class LLaMa:
|
||||
self.tokenizer = tokenizer
|
||||
|
||||
def greedy_until(self, prompt:str, until, max_length, temperature):
|
||||
# only used in old eval script
|
||||
import numpy as np
|
||||
toks = [self.tokenizer.bos_id()] + self.tokenizer.encode(prompt)
|
||||
start_pos = 0
|
||||
for i in range(max_length):
|
||||
@@ -330,6 +327,7 @@ int main()
|
||||
\end{code}
|
||||
"""
|
||||
if __name__ == "__main__":
|
||||
Tensor.no_grad = True
|
||||
print(f"using {Device.DEFAULT} backend")
|
||||
|
||||
parser = argparse.ArgumentParser(description="Run LLaMA in tinygrad", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
@@ -445,7 +443,7 @@ After you are done speaking, output [EOS]. You are not Chad.
|
||||
print(f"using LLaMA{LLAMA_SUFFIX}-{args.size} model")
|
||||
device = tuple(f"{Device.DEFAULT}:{i}" for i in range(args.shard)) if args.shard > 1 else Device.DEFAULT
|
||||
llama = LLaMa.build(MODEL_PATH, TOKENIZER_PATH, model_gen=args.gen, model_size=args.size, quantize=args.quantize, device=device)
|
||||
param_bytes = sum(x.uop.size * x.dtype.itemsize for x in get_parameters(llama.model))
|
||||
param_bytes = sum(x.lazydata.size * x.dtype.itemsize for x in get_parameters(llama.model))
|
||||
|
||||
outputted = pre_prompt if chatbot else args.prompt
|
||||
start_pos, toks = 0, [llama.tokenizer.bos_id()] + llama.tokenizer.encode(outputted)
|
||||
@@ -477,12 +475,11 @@ After you are done speaking, output [EOS]. You are not Chad.
|
||||
next_tok = Tensor([toks[start_pos:]], device=device) if tok_tensor is None or (len(toks)-start_pos) > 1 else tok_tensor.reshape(1, 1)
|
||||
with Profiling(enabled=args.profile):
|
||||
with Timing("total ", enabled=args.timing, on_exit=lambda x: f", {1e9/x:.2f} tok/s, {GlobalCounters.global_mem/x:.2f} GB/s, param {param_bytes/x:.2f} GB/s"):
|
||||
with WallTimeEvent(BenchEvent.STEP):
|
||||
with Timing("enqueue in ", on_exit=(lambda et: (f", {(GlobalCounters.time_sum_s-st)*1e3:.2f} ms on GPU" if DEBUG>=2 else "")+
|
||||
f", {GlobalCounters.global_ops*1e-9:.2f} GOPS, {GlobalCounters.global_mem*1e-9:.2f} GB"+
|
||||
(f", {GlobalCounters.global_mem*1e-9/(GlobalCounters.time_sum_s-st):.2f} GB/s, param {param_bytes*1e-9/(GlobalCounters.time_sum_s-st):.2f} GB/s" if DEBUG>=2 else "")) if DEBUG else None, enabled=args.timing):
|
||||
tok_tensor = llama.model(next_tok, start_pos, args.temperature)
|
||||
tok = tok_tensor.item()
|
||||
with Timing("enqueue in ", on_exit=(lambda et: (f", {(GlobalCounters.time_sum_s-st)*1e3:.2f} ms on GPU" if DEBUG>=2 else "")+
|
||||
f", {GlobalCounters.global_ops*1e-9:.2f} GOPS, {GlobalCounters.global_mem*1e-9:.2f} GB"+
|
||||
(f", {GlobalCounters.global_mem*1e-9/(GlobalCounters.time_sum_s-st):.2f} GB/s, param {param_bytes*1e-9/(GlobalCounters.time_sum_s-st):.2f} GB/s" if DEBUG>=2 else "")) if DEBUG else None, enabled=args.timing):
|
||||
tok_tensor = llama.model(next_tok, start_pos, args.temperature)
|
||||
tok = tok_tensor.item()
|
||||
|
||||
# use the kv cache
|
||||
start_pos = len(toks)
|
||||
@@ -501,16 +498,14 @@ After you are done speaking, output [EOS]. You are not Chad.
|
||||
if not chatbot: break
|
||||
|
||||
# validate output!
|
||||
if args.temperature == 0 and args.count == 10 and args.prompt == "Hello.":
|
||||
if args.temperature == 0 and args.count == 10 and args.prompt == "Hello." and not args.quantize:
|
||||
text = llama.tokenizer.decode(toks)
|
||||
key = (args.gen, args.size, args.quantize)
|
||||
key = (args.gen, args.size)
|
||||
expected = {
|
||||
("1", "7B", None): "Hello. I'm a 20 year old male",
|
||||
("1", "7B", "int8"): "Hello. I'm a 20 year old male",
|
||||
("1", "7B", "nf4"): "Hello. I'm a 20 year old male",
|
||||
("2", "7B", None): "Hello. I'm a 20 year old girl",
|
||||
("2", "70B", None): "Hello. I am a 20 year old female.",
|
||||
("3", "8B", None): "Hello. I am a 20 year old female. I",
|
||||
("1", "7B"): "Hello. I'm a 20 year old male",
|
||||
("2", "7B"): "Hello. I'm a 20 year old girl",
|
||||
("2", "70B"): "Hello. I am a 20 year old female.",
|
||||
("3", "8B"): "Hello. I am a 20 year old female. I",
|
||||
}
|
||||
try:
|
||||
assert text == expected[key], f"invalid output: `{colored(text, 'red')}` != `{expected[key]}`"
|
||||
|
||||
+66
-108
@@ -1,13 +1,12 @@
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
import json, argparse, random, time, os
|
||||
import json, argparse, random, time
|
||||
import tiktoken
|
||||
from tiktoken.load import load_tiktoken_bpe
|
||||
from extra.models.llama import Transformer, convert_from_huggingface, convert_from_gguf, fix_bf16
|
||||
from tinygrad.nn.state import safe_load, torch_load, load_state_dict, get_parameters, gguf_load
|
||||
from extra.models.llama import Transformer, convert_from_huggingface, fix_bf16
|
||||
from tinygrad.nn.state import safe_load, torch_load, load_state_dict, get_parameters
|
||||
from tinygrad import Tensor, dtypes, nn, Context, Device, GlobalCounters
|
||||
from tinygrad.helpers import Profiling, Timing, DEBUG, colored, fetch, tqdm
|
||||
from extra.bench_log import BenchEvent, WallTimeEvent
|
||||
|
||||
class Tokenizer:
|
||||
pat_str = r"(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}{1,3}| ?[^\s\p{L}\p{N}]+[\r\n]*|\s*[\r\n]+|\s+(?!\S)|\s+"
|
||||
@@ -48,7 +47,7 @@ def concat_weights(models, device=None):
|
||||
disk_tensors: List[Tensor] = [model[name] for model in models]
|
||||
if len(disk_tensors) == 1 or len(disk_tensors[0].shape) == 1:
|
||||
return disk_tensors[0].to(device=device)
|
||||
axis = 1 if name.endswith((".attention.wo.weight", ".feed_forward.w2.weight")) else 0
|
||||
axis = 1 if name.endswith(".attention.wo.weight") or name.endswith(".feed_forward.w2.weight") else 0
|
||||
lazy_tensors = [data.to(device=device) for data in disk_tensors]
|
||||
return lazy_tensors[0].cat(*lazy_tensors[1:], dim=axis)
|
||||
return {name: convert(name) for name in {name: None for model in models for name in model}}
|
||||
@@ -58,9 +57,6 @@ def load(fn:str):
|
||||
with open(fn) as fp: weight_map = json.load(fp)['weight_map']
|
||||
parts = {n: load(str(Path(fn).parent / Path(n).name)) for n in set(weight_map.values())}
|
||||
return {k: parts[n][k] for k, n in weight_map.items()}
|
||||
elif fn.endswith(".gguf"):
|
||||
gguf_tensor = Tensor.empty(os.stat(fn).st_size, dtype=dtypes.uint8, device=f"disk:{fn}").to(Device.DEFAULT)
|
||||
return gguf_load(gguf_tensor)[1]
|
||||
elif fn.endswith(".safetensors"):
|
||||
return safe_load(fn)
|
||||
else:
|
||||
@@ -74,17 +70,16 @@ class Int8Linear:
|
||||
self.scale = Tensor.ones(out_features, dtype=dtypes.half)
|
||||
|
||||
def __call__(self, x):
|
||||
return x.dot(self.weight.cast(self.scale.dtype).T*self.scale)
|
||||
return x.dot(self.weight.cast(dtype=dtypes.half).T*self.scale)
|
||||
|
||||
@staticmethod
|
||||
def quantize(tensors, device, scale_dtype=dtypes.float16, quantize_embeds=False):
|
||||
def quantize(tensors, device):
|
||||
new_tensors = {}
|
||||
for name,v in tensors.items():
|
||||
if "feed_forward" in name or "attention.w" in name or (quantize_embeds and "tok_embeddings.weight" in name):
|
||||
if "feed_forward" in name or "attention.w" in name:
|
||||
assert "weight" in name, name
|
||||
v = v.cast(scale_dtype)
|
||||
scale = v.abs().max(axis=1) / 127.0
|
||||
int8_weight = (v.T/scale).T.round().cast(dtype=dtypes.int8) # without round(), cast truncates -34.9 to -34
|
||||
int8_weight = (v.T/scale).T.cast(dtype=dtypes.int8)
|
||||
new_tensors[name] = int8_weight
|
||||
new_tensors[name.replace('weight', 'scale')] = scale
|
||||
if isinstance(device, tuple):
|
||||
@@ -92,20 +87,8 @@ class Int8Linear:
|
||||
new_tensors[name.replace('weight', 'scale')].shard_(device, axis=None)
|
||||
else:
|
||||
new_tensors[name] = v
|
||||
if quantize_embeds: new_tensors.update({"output.weight": new_tensors["tok_embeddings.weight"], "output.scale": new_tensors["tok_embeddings.scale"]})
|
||||
return new_tensors
|
||||
|
||||
class Int8Embedding:
|
||||
def __init__(self, vocab_size:int, embed_size:int):
|
||||
self.vocab_sz, self.embed_sz = vocab_size, embed_size
|
||||
self.weight, self.scale = Tensor.ones(vocab_size, embed_size, dtype=dtypes.int8), Tensor.ones(vocab_size, dtype=dtypes.half)
|
||||
|
||||
def __call__(self, idx:Tensor) -> Tensor:
|
||||
if not hasattr(self, 'arange'): self.arange = Tensor.arange(self.vocab_sz, requires_grad=False, device=self.weight.device).unsqueeze(-1)
|
||||
big_shp = idx.shape+(self.vocab_sz, self.embed_sz)
|
||||
arange, idx, vals = self.arange.expand(big_shp), idx.reshape(idx.shape+(1, 1)).expand(big_shp), (self.weight.cast(self.scale.dtype).T*self.scale).T
|
||||
return (arange == idx).mul(vals).sum(-2, dtype=vals.dtype)
|
||||
|
||||
def NF4Linear(block_size):
|
||||
_CODE = [
|
||||
-1.0, -0.6961928009986877, -0.5250730514526367, -0.39491748809814453, -0.28444138169288635, -0.18477343022823334, -0.09105003625154495, 0.0,
|
||||
@@ -122,13 +105,12 @@ def NF4Linear(block_size):
|
||||
def __call__(self, x: Tensor) -> Tensor:
|
||||
high_bits = self.weight
|
||||
low_bits = (self.weight * 2 ** 4).contiguous()
|
||||
unpacked = Tensor.stack(high_bits, low_bits, dim=-1).idiv(2 ** 4)
|
||||
unpacked = Tensor.stack(high_bits, low_bits, dim=-1).div(2 ** 4, upcast=False)
|
||||
unscaled = CODE[unpacked].to(x.device).reshape(-1, block_size) * self.scale
|
||||
return x.linear(unscaled.reshape(self.out_features, self.in_features).T)
|
||||
|
||||
@staticmethod
|
||||
def quantize(state_dict: dict[str, Tensor], device, scale_dtype=dtypes.float16, quantize_embeds=False) -> dict[str, Tensor]:
|
||||
assert not quantize_embeds # TODO: support this?
|
||||
def quantize(state_dict: dict[str, Tensor], device) -> dict[str, Tensor]:
|
||||
new_state_dict = {}
|
||||
for k, v in state_dict.items():
|
||||
if "feed_forward" in k or "attention.w" in k:
|
||||
@@ -136,7 +118,7 @@ def NF4Linear(block_size):
|
||||
scale = (grouped.abs().max(axis=1, keepdim=True))
|
||||
coded = ((grouped / scale).unsqueeze(-1) - CODE.to(v.device)).abs().argmin(axis=-1).cast(dtypes.uint8).flatten()
|
||||
new_state_dict[k] = coded[::2] * 2 ** 4 + coded[1::2]
|
||||
new_state_dict[k.replace(".weight", ".scale")] = scale.cast(scale_dtype)
|
||||
new_state_dict[k.replace(".weight", ".scale")] = scale.cast(dtypes.float16)
|
||||
if isinstance(device, tuple):
|
||||
new_state_dict[k].shard_(device, axis=-1)
|
||||
new_state_dict[k.replace('weight', 'scale')].shard_(device, axis=None)
|
||||
@@ -146,10 +128,6 @@ def NF4Linear(block_size):
|
||||
return _NF4Linear
|
||||
|
||||
MODEL_PARAMS = {
|
||||
"1B": {
|
||||
"args": {"dim": 2048, "n_heads": 32, "n_kv_heads": 8, "n_layers": 16, "norm_eps": 1e-5, "rope_theta": 500000, "vocab_size": 128256, "hidden_dim": 8192},
|
||||
"files": 1
|
||||
},
|
||||
"8B": {
|
||||
"args": {"dim": 4096, "n_heads": 32, "n_kv_heads": 8, "n_layers": 32, "norm_eps": 1e-5, "rope_theta": 500000, "vocab_size": 128256, "hidden_dim": 14336},
|
||||
"files": 1
|
||||
@@ -157,56 +135,46 @@ MODEL_PARAMS = {
|
||||
"70B": {
|
||||
"args": {"dim": 8192, "n_heads": 64, "n_kv_heads": 8, "n_layers": 80, "norm_eps": 1e-5, "rope_theta": 500000, "vocab_size": 128256, "hidden_dim": 28672},
|
||||
"files": 8
|
||||
},
|
||||
"405B": {
|
||||
"args": {"dim": 16384, "n_heads": 128, "n_kv_heads": 8, "n_layers": 126, "norm_eps": 1e-5, "rope_theta": 500000, "vocab_size": 128256, "hidden_dim": 53248},
|
||||
"files": 191
|
||||
},
|
||||
}
|
||||
}
|
||||
def build_transformer(model_path: Path, model_size="8B", quantize=None, scale_dtype=dtypes.float16, device=None, max_context=8192, load_weights=True):
|
||||
def build_transformer(model_path: Path, model_size="8B", quantize=None, device=None):
|
||||
# build model
|
||||
if quantize == "int8": linear, embedding, quantize_embeds = Int8Linear, Int8Embedding, True
|
||||
elif quantize == "nf4": linear, embedding, quantize_embeds = NF4Linear(64), nn.Embedding, False
|
||||
else: linear, embedding, quantize_embeds = nn.Linear, nn.Embedding, False
|
||||
model = Transformer(**MODEL_PARAMS[model_size]["args"], linear=linear, embedding=embedding, max_context=max_context, jit=True)
|
||||
|
||||
if not load_weights: return model
|
||||
if quantize == "int8": linear = Int8Linear
|
||||
elif quantize == "nf4": linear = NF4Linear(64)
|
||||
else: linear = nn.Linear
|
||||
model = Transformer(**MODEL_PARAMS[model_size]["args"], linear=linear, max_context=8192, jit=True)
|
||||
|
||||
# load weights
|
||||
with WallTimeEvent(BenchEvent.LOAD_WEIGHTS):
|
||||
if model_path.is_dir():
|
||||
if (model_path / "model.safetensors.index.json").exists(): weights = load(str(model_path / "model.safetensors.index.json"))
|
||||
elif (model_path / "model.safetensors").exists(): weights = load(str(model_path / "model.safetensors"))
|
||||
else: weights = concat_weights([load(str(model_path / f"consolidated.{i:02d}.pth")) for i in range(MODEL_PARAMS[model_size]["files"])], device[0] if isinstance(device, tuple) else device)
|
||||
else:
|
||||
weights = load(str(model_path))
|
||||
if "model.embed_tokens.weight" in weights:
|
||||
weights = convert_from_huggingface(weights, MODEL_PARAMS[model_size]["args"]["n_layers"], MODEL_PARAMS[model_size]["args"]["n_heads"], MODEL_PARAMS[model_size]["args"]["n_kv_heads"])
|
||||
elif "token_embd.weight" in weights:
|
||||
weights = convert_from_gguf(weights, MODEL_PARAMS[model_size]["args"]["n_layers"])
|
||||
weights = fix_bf16(weights)
|
||||
if model_path.is_dir():
|
||||
if (model_path / "model.safetensors.index.json").exists(): weights = load(str(model_path / "model.safetensors.index.json"))
|
||||
elif (model_path / "model.safetensors").exists(): weights = load(str(model_path / "model.safetensors"))
|
||||
else: weights = concat_weights([load(str(model_path / f"consolidated.{i:02d}.pth")) for i in range(MODEL_PARAMS[model_size]["files"])], device[0] if isinstance(device, tuple) else device)
|
||||
else:
|
||||
weights = load(str(model_path))
|
||||
if "model.embed_tokens.weight" in weights:
|
||||
weights = convert_from_huggingface(weights, model, MODEL_PARAMS[model_size]["args"]["n_heads"], MODEL_PARAMS[model_size]["args"]["n_kv_heads"])
|
||||
weights = fix_bf16(weights)
|
||||
|
||||
with Context(BEAM=0):
|
||||
# quantize
|
||||
if quantize == "float16": weights = {k:v.cast(quantize).contiguous() for k,v in weights.items()}
|
||||
elif quantize is not None:
|
||||
weights = linear.quantize(weights, device, scale_dtype, quantize_embeds)
|
||||
for _,v in weights.items(): v.realize()
|
||||
with Context(BEAM=0):
|
||||
# quantize
|
||||
if quantize is not None:
|
||||
weights = linear.quantize(weights, device)
|
||||
for _,v in weights.items(): v.realize()
|
||||
|
||||
# shard
|
||||
if isinstance(device, tuple):
|
||||
for k,v in nn.state.get_state_dict(model).items():
|
||||
if 'scale' in k: v.shard_(device, axis=None) # from quantized
|
||||
elif '.attention.' in k: v.shard_(device, axis=-1)
|
||||
elif '.feed_forward.w1.' in k: v.shard_(device, axis=0)
|
||||
elif '.feed_forward.w3.' in k: v.shard_(device, axis=0)
|
||||
elif '.feed_forward.' in k: v.shard_(device, axis=-1)
|
||||
elif 'tok_embeddings.weight' in k: v.shard_(device, axis=0)
|
||||
elif 'output.weight' in k: v.shard_(device, axis=0)
|
||||
else: v.shard_(device, axis=None)
|
||||
# shard
|
||||
if isinstance(device, tuple):
|
||||
for k,v in nn.state.get_state_dict(model).items():
|
||||
if 'scale' in k: v.shard_(device, axis=None) # from quantized
|
||||
elif '.attention.' in k: v.shard_(device, axis=-1)
|
||||
elif '.feed_forward.w1.' in k: v.shard_(device, axis=0)
|
||||
elif '.feed_forward.w3.' in k: v.shard_(device, axis=0)
|
||||
elif '.feed_forward.' in k: v.shard_(device, axis=-1)
|
||||
elif 'tok_embeddings.weight' in k: v.shard_(device, axis=0)
|
||||
elif 'output.weight' in k: v.shard_(device, axis=0)
|
||||
else: v.shard_(device, axis=None)
|
||||
|
||||
# replace weights in model
|
||||
load_state_dict(model, weights, strict=False, consume=True)
|
||||
# replace weights in model
|
||||
load_state_dict(model, weights, strict=False, consume=True)
|
||||
return model
|
||||
|
||||
# default settings
|
||||
@@ -237,41 +205,33 @@ def prefill(model, toks, start_pos=0):
|
||||
return start_pos
|
||||
|
||||
if __name__ == "__main__":
|
||||
Tensor.no_grad = True
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--download_model", action="store_true", help="Download a model")
|
||||
parser.add_argument("--download_model", action="store_true", help="Download a 8B model")
|
||||
parser.add_argument("--model", type=Path, help="Model path")
|
||||
parser.add_argument("--size", choices=["1B", "8B", "70B", "405B"], default="1B", help="Model size")
|
||||
parser.add_argument("--size", choices=["8B", "70B"], default="8B", help="Model size")
|
||||
parser.add_argument("--shard", type=int, default=1, help="Shard the model across multiple devices")
|
||||
parser.add_argument("--quantize", choices=["int8", "nf4", "float16"], help="Quantization method")
|
||||
parser.add_argument("--quantize", choices=["int8", "nf4"], help="Quantization method")
|
||||
parser.add_argument("--no_api", action="store_true", help="Disable the api and run a cli test interface")
|
||||
parser.add_argument("--host", type=str, default="0.0.0.0", help="Web server bind address")
|
||||
parser.add_argument("--port", type=int, default=7776, help="Web server port")
|
||||
parser.add_argument("--debug", action="store_true", help="Enable debug mode")
|
||||
parser.add_argument("--seed", type=int, help="Random seed")
|
||||
parser.add_argument("--temperature", type=float, default=0.85, help="Temperature")
|
||||
parser.add_argument("--temperature", type=int, default=0.85, help="Temperature")
|
||||
parser.add_argument("--benchmark", action="store_true", help="Run a benchmark")
|
||||
parser.add_argument("--timing", action="store_true", help="Print timing per token")
|
||||
parser.add_argument("--profile", action="store_true", help="Output profile data")
|
||||
args = parser.parse_args()
|
||||
|
||||
# download_model is the default without a model passed in
|
||||
if args.download_model or not args.model:
|
||||
if args.size == "1B":
|
||||
fetch("https://huggingface.co/bofenghuang/Meta-Llama-3-8B/resolve/main/original/tokenizer.model", "tokenizer.model", subdir="llama3-1b-instruct")
|
||||
args.model = fetch("https://huggingface.co/bartowski/Llama-3.2-1B-Instruct-GGUF/resolve/main/Llama-3.2-1B-Instruct-Q6_K.gguf", "Llama-3.2-1B-Instruct-Q6_K.gguf", subdir="llama3-1b-instruct")
|
||||
elif args.size == "8B":
|
||||
fetch("https://huggingface.co/bofenghuang/Meta-Llama-3-8B/resolve/main/original/tokenizer.model", "tokenizer.model", subdir="llama3-8b-sfr")
|
||||
fetch("https://huggingface.co/TriAiExperiments/SFR-Iterative-DPO-LLaMA-3-8B-R/resolve/main/model-00001-of-00004.safetensors", "model-00001-of-00004.safetensors", subdir="llama3-8b-sfr")
|
||||
fetch("https://huggingface.co/TriAiExperiments/SFR-Iterative-DPO-LLaMA-3-8B-R/resolve/main/model-00002-of-00004.safetensors", "model-00002-of-00004.safetensors", subdir="llama3-8b-sfr")
|
||||
fetch("https://huggingface.co/TriAiExperiments/SFR-Iterative-DPO-LLaMA-3-8B-R/resolve/main/model-00003-of-00004.safetensors", "model-00003-of-00004.safetensors", subdir="llama3-8b-sfr")
|
||||
fetch("https://huggingface.co/TriAiExperiments/SFR-Iterative-DPO-LLaMA-3-8B-R/resolve/main/model-00004-of-00004.safetensors", "model-00004-of-00004.safetensors", subdir="llama3-8b-sfr")
|
||||
args.model = fetch("https://huggingface.co/TriAiExperiments/SFR-Iterative-DPO-LLaMA-3-8B-R/raw/main/model.safetensors.index.json", "model.safetensors.index.json", subdir="llama3-8b-sfr")
|
||||
elif args.size == "70B":
|
||||
subdir = "DeepSeek-R1-Distill-Llama-70B"
|
||||
args.model = fetch("https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-70B/resolve/main/model.safetensors.index.json?download=true", "model.safetensors.index.json", subdir=subdir)
|
||||
fetch("https://huggingface.co/bofenghuang/Meta-Llama-3-8B/resolve/main/original/tokenizer.model", "tokenizer.model", subdir=subdir)
|
||||
for i in range(17):
|
||||
fetch(f"https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Llama-70B/resolve/main/model-{i+1:05d}-of-000017.safetensors?download=true", f"model-{i+1:05d}-of-000017.safetensors", subdir=subdir)
|
||||
assert not (args.download_model and args.model), "either download or provide model"
|
||||
if args.download_model:
|
||||
fetch("https://huggingface.co/bofenghuang/Meta-Llama-3-8B/resolve/main/original/tokenizer.model", "tokenizer.model", subdir="llama3-8b-sfr")
|
||||
fetch("https://huggingface.co/TriAiExperiments/SFR-Iterative-DPO-LLaMA-3-8B-R/resolve/main/model-00001-of-00004.safetensors", "model-00001-of-00004.safetensors", subdir="llama3-8b-sfr")
|
||||
fetch("https://huggingface.co/TriAiExperiments/SFR-Iterative-DPO-LLaMA-3-8B-R/resolve/main/model-00002-of-00004.safetensors", "model-00002-of-00004.safetensors", subdir="llama3-8b-sfr")
|
||||
fetch("https://huggingface.co/TriAiExperiments/SFR-Iterative-DPO-LLaMA-3-8B-R/resolve/main/model-00003-of-00004.safetensors", "model-00003-of-00004.safetensors", subdir="llama3-8b-sfr")
|
||||
fetch("https://huggingface.co/TriAiExperiments/SFR-Iterative-DPO-LLaMA-3-8B-R/resolve/main/model-00004-of-00004.safetensors", "model-00004-of-00004.safetensors", subdir="llama3-8b-sfr")
|
||||
args.model = fetch("https://huggingface.co/TriAiExperiments/SFR-Iterative-DPO-LLaMA-3-8B-R/raw/main/model.safetensors.index.json", "model.safetensors.index.json", subdir="llama3-8b-sfr")
|
||||
|
||||
assert args.model is not None, "please provide --model option"
|
||||
|
||||
@@ -288,7 +248,7 @@ if __name__ == "__main__":
|
||||
|
||||
device = tuple(f"{Device.DEFAULT}:{i}" for i in range(args.shard)) if args.shard > 1 else Device.DEFAULT
|
||||
model = build_transformer(args.model, model_size=args.size, quantize=args.quantize, device=device)
|
||||
param_bytes = sum(x.uop.size * x.dtype.itemsize for x in get_parameters(model))
|
||||
param_bytes = sum(x.lazydata.size * x.dtype.itemsize for x in get_parameters(model))
|
||||
|
||||
if not args.no_api and not args.benchmark:
|
||||
from bottle import Bottle, request, response, HTTPResponse, abort, static_file
|
||||
@@ -308,9 +268,8 @@ if __name__ == "__main__":
|
||||
for key, value in cors_headers.items(): response.set_header(key, value)
|
||||
|
||||
@app.route("/<filename>")
|
||||
def server_static(filename): return static_file(filename, root=(Path(__file__).parent / "tinychat").as_posix())
|
||||
@app.route("/assets/<filename:path>")
|
||||
def server_assets(filename): return static_file(filename, root=(Path(__file__).parent / "tinychat" / "assets").as_posix())
|
||||
def server_static(filename):
|
||||
return static_file(filename, root=(Path(__file__).parent / "tinychat").as_posix())
|
||||
@app.route("/")
|
||||
def index():
|
||||
return static_file("index.html", root=(Path(__file__).parent / "tinychat").as_posix())
|
||||
@@ -440,12 +399,11 @@ if __name__ == "__main__":
|
||||
st = GlobalCounters.time_sum_s
|
||||
with Profiling(enabled=args.profile):
|
||||
with Timing("total ", on_exit=lambda x: f", {1e9/x:.2f} tok/s, {GlobalCounters.global_mem/x:.2f} GB/s, param {param_bytes/x:.2f} GB/s"):
|
||||
with WallTimeEvent(BenchEvent.STEP):
|
||||
with Timing("enqueue in ", on_exit=(lambda et: (f", {(GlobalCounters.time_sum_s-st)*1e3:.2f} ms on GPU" if DEBUG>=2 else "")+
|
||||
f", {GlobalCounters.global_ops*1e-9:.2f} GOPS, {GlobalCounters.global_mem*1e-9:.2f} GB"+
|
||||
(f", {GlobalCounters.global_mem*1e-9/(GlobalCounters.time_sum_s-st):.2f} GB/s, param {param_bytes*1e-9/(GlobalCounters.time_sum_s-st):.2f} GB/s" if DEBUG>=2 else "")) if DEBUG else None):
|
||||
tok = model(Tensor([[last_tok]], device=device), start_pos, TEMPERATURE, TOP_K, TOP_P, ALPHA_F, ALPHA_P)
|
||||
tok = tok.item()
|
||||
with Timing("enqueue in ", on_exit=(lambda et: (f", {(GlobalCounters.time_sum_s-st)*1e3:.2f} ms on GPU" if DEBUG>=2 else "")+
|
||||
f", {GlobalCounters.global_ops*1e-9:.2f} GOPS, {GlobalCounters.global_mem*1e-9:.2f} GB"+
|
||||
(f", {GlobalCounters.global_mem*1e-9/(GlobalCounters.time_sum_s-st):.2f} GB/s, param {param_bytes*1e-9/(GlobalCounters.time_sum_s-st):.2f} GB/s" if DEBUG>=2 else "")) if DEBUG else None):
|
||||
tok = model(Tensor([[last_tok]], device=device), start_pos, TEMPERATURE, TOP_K, TOP_P, ALPHA_F, ALPHA_P)
|
||||
tok = tok.item()
|
||||
start_pos += 1
|
||||
last_tok = tok
|
||||
generated += tokenizer.decode([tok])
|
||||
|
||||
+16
-15
@@ -1,13 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
if "NOOPT" not in os.environ: os.environ["NOOPT"] = "1"
|
||||
from tinygrad import Device, nn, Tensor, dtypes
|
||||
Device.DEFAULT = "CPU"
|
||||
from tinygrad import Device, nn, Tensor, dtypes, Variable
|
||||
Device.DEFAULT = "CLANG"
|
||||
from train_gpt2 import GPT, GPTConfig
|
||||
from tinygrad.helpers import dedup, flatten, getenv, GlobalCounters, to_function_name
|
||||
from tinygrad.engine.realize import get_kernel
|
||||
from tinygrad.engine.memory import memory_planner
|
||||
from tinygrad.uop.ops import Ops
|
||||
from tinygrad.helpers import dedup, to_function_name, flatten, getenv, GRAPH, GlobalCounters, ansilen, to_function_name
|
||||
from tinygrad.engine.schedule import create_schedule
|
||||
from tinygrad.engine.realize import get_kernel, memory_planner, run_schedule
|
||||
from tinygrad.ops import MetaOps, UOps
|
||||
|
||||
TIMING = getenv("TIMING")
|
||||
|
||||
@@ -16,7 +16,7 @@ if __name__ == "__main__":
|
||||
#model.load_pretrained()
|
||||
for p in nn.state.get_parameters(model): p.replace(Tensor.empty(p.shape, dtype=p.dtype)) # fake load pretrained
|
||||
|
||||
#early_sched = create_schedule([x.uop for x in nn.state.get_parameters(model)])
|
||||
#early_sched = create_schedule([x.lazydata for x in nn.state.get_parameters(model)])
|
||||
#print(f"built model {len(early_sched)}")
|
||||
|
||||
#B, T = Variable("B", 1, 128).bind(4), 64 #Variable("T", 1, 1024).bind(64)
|
||||
@@ -25,7 +25,8 @@ if __name__ == "__main__":
|
||||
Tensor.training = True
|
||||
optimizer = nn.optim.Adam(nn.state.get_parameters(model), lr=1e-4)
|
||||
warmup_count = getenv("WARMUP", 3)
|
||||
for i in range(warmup_count): # TODO: why does it take three and not two to stabilize
|
||||
for i in range(warmup_count): # TODO: why does it take three and not two to stablize
|
||||
if i == warmup_count-1: GRAPH.value = getenv("LATEGRAPH")
|
||||
GlobalCounters.reset()
|
||||
X = Tensor.empty(4, 64, dtype=dtypes.int).reshape(B, T)
|
||||
Y = Tensor.empty(4, 64, dtype=dtypes.int).reshape(B, T)
|
||||
@@ -36,16 +37,16 @@ if __name__ == "__main__":
|
||||
tensors = optimizer.schedule_step()
|
||||
else:
|
||||
tensors = []
|
||||
sched = loss.schedule(*tensors)
|
||||
sched = create_schedule([loss.lazydata] + [x.lazydata for x in tensors])
|
||||
print(f"calls {i}:", len(sched))
|
||||
#run_schedule(sched[:])
|
||||
sched = memory_planner(sched)
|
||||
ast_dedup = dedup([si.ast for si in sched if si.ast.op is Ops.SINK])
|
||||
ast_dedup = dedup([si.ast for si in sched if si.ast.op is UOps.SINK])
|
||||
srcs = {}
|
||||
for ast in ast_dedup:
|
||||
k = get_kernel(Device["CPU"].renderer, ast)
|
||||
k = get_kernel(Device["CLANG"].renderer, ast)
|
||||
k.linearize()
|
||||
src = Device["CPU"].renderer.render(to_function_name(k.name), k.uops)
|
||||
src = Device["CLANG"].renderer.render(to_function_name(k.name), k.uops)
|
||||
srcs[ast] = (k.name, src)
|
||||
print("functions:", len(srcs))
|
||||
used_buffers = dedup(flatten([si.bufs for si in sched]))
|
||||
@@ -56,7 +57,7 @@ if __name__ == "__main__":
|
||||
state_dict.update({'X': X, 'Y': Y, 'loss': loss})
|
||||
grad_state_dict = {}
|
||||
for k,v in state_dict.items():
|
||||
if v.uop.base.buffer not in used_buffers: print(f"UNUSED: {k}")
|
||||
if v.lazydata.base.buffer not in used_buffers: print(f"UNUSED: {k}")
|
||||
if v.grad is not None: grad_state_dict['grad_'+k] = v.grad
|
||||
state_dict.update(grad_state_dict)
|
||||
state_dict.update({'adam_b1_t': optimizer.b1_t, 'adam_b2_t': optimizer.b2_t, 'adam_lr': optimizer.lr})
|
||||
@@ -65,7 +66,7 @@ if __name__ == "__main__":
|
||||
nm = inverse_state_dict[p]
|
||||
state_dict["adam_m_"+nm] = m
|
||||
state_dict["adam_v_"+nm] = v
|
||||
named_buffers = {v.uop.base.buffer:k.replace(".", "_") for k,v in state_dict.items()}
|
||||
named_buffers = {v.lazydata.base.buffer:k.replace(".", "_") for k,v in state_dict.items()}
|
||||
|
||||
c_code = ["#include <stdlib.h>", "#include <tgmath.h>", "#include <stdbool.h>"]
|
||||
if TIMING: c_code += ["#include <stdio.h>", "#include <time.h>"]
|
||||
@@ -81,7 +82,7 @@ if __name__ == "__main__":
|
||||
for i,si in enumerate(sched):
|
||||
bufs = [(named_buffers.get(b, f"b{numbered_bufs[b]}"), b) for b in si.bufs]
|
||||
all_bufs += bufs
|
||||
if si.ast.op is not Ops.SINK:
|
||||
if si.ast.op is not UOps.SINK:
|
||||
print(f"// {si.ast.op}", bufs)
|
||||
else:
|
||||
print(f"{srcs[si.ast][0]}({', '.join([x[0] for x in bufs])})")
|
||||
|
||||
@@ -99,7 +99,7 @@ class GPT:
|
||||
|
||||
def __call__(self, idx:Tensor, targets=None):
|
||||
b, t = idx.shape
|
||||
pos = Tensor.arange(0, t, device=idx.device)
|
||||
pos = Tensor.arange(0, t)
|
||||
|
||||
tok_emb = self.wte(idx) # token embeddings of shape (b, t, n_embd)
|
||||
pos_emb = self.wpe(pos) # position embeddings of shape (t, n_embd)
|
||||
@@ -124,7 +124,6 @@ if __name__ == "__main__":
|
||||
parser.add_argument("--batch_size", type=int, default=4, help="batch size")
|
||||
parser.add_argument("--sequence_length", type=int, default=64, help="sequence length")
|
||||
parser.add_argument("--skip_test", action="store_true", help="skip test")
|
||||
parser.add_argument("--gpus", type=int, default=1, help="sequence length")
|
||||
args = parser.parse_args()
|
||||
B, T = args.batch_size, args.sequence_length
|
||||
assert 1 <= T <= 1024
|
||||
@@ -132,10 +131,6 @@ if __name__ == "__main__":
|
||||
model = GPT(GPTConfig(n_layer=12, n_head=12, n_embd=768))
|
||||
model.load_pretrained()
|
||||
|
||||
if args.gpus > 1:
|
||||
GPUS = tuple(f'{Device.DEFAULT}:{i}' for i in range(args.gpus))
|
||||
for x in nn.state.get_parameters(model): x.to_(GPUS) # we put a copy of the model on every GPU
|
||||
|
||||
# init the tokenizer
|
||||
enc = tiktoken.get_encoding("gpt2")
|
||||
encode = lambda s: enc.encode(s, allowed_special={"<|endoftext|>"})
|
||||
@@ -170,32 +165,23 @@ if __name__ == "__main__":
|
||||
x, y = next(data_iter) # we'll overfit this batch below
|
||||
optimizer = nn.optim.AdamW(nn.state.get_parameters(model), lr=1e-4, weight_decay=0)
|
||||
|
||||
print(f"model state: {sum(x.nbytes() for x in nn.state.get_parameters(model))/1e9:.2f} GB")
|
||||
print(f"optimizer state: {sum(x.nbytes() for x in nn.state.get_parameters(optimizer))/1e9:.2f} GB")
|
||||
|
||||
# shard the data on axis 0
|
||||
if args.gpus > 1: x, y = x.shard(GPUS, axis=0), y.shard(GPUS, axis=0)
|
||||
|
||||
@TinyJit
|
||||
@Tensor.train()
|
||||
def step(x:Tensor, y:Tensor) -> Tensor:
|
||||
def step(x, y):
|
||||
_, loss = model(x, y)
|
||||
optimizer.zero_grad()
|
||||
loss.backward()
|
||||
return loss.realize(*optimizer.schedule_step())
|
||||
|
||||
for i in range(args.num_iterations):
|
||||
GlobalCounters.reset()
|
||||
t0 = time.perf_counter()
|
||||
loss = step(x.contiguous(), y.contiguous())
|
||||
Device[Device.DEFAULT].synchronize()
|
||||
t1 = time.perf_counter()
|
||||
print(f"iteration {i}, loss: {loss.item():.6f}, time: {(t1-t0)*1000:.3f}ms, {int(B*T/(t1-t0))} tok/s, {GlobalCounters.global_mem/1e9:.2f} GB")
|
||||
with Tensor.train():
|
||||
for i in range(args.num_iterations):
|
||||
GlobalCounters.reset()
|
||||
t0 = time.time()
|
||||
loss = step(x.contiguous(), y.contiguous())
|
||||
Device[Device.DEFAULT].synchronize()
|
||||
t1 = time.time()
|
||||
print(f"iteration {i}, loss: {loss.item():.6f}, time: {(t1-t0)*1000:.3f}ms, {int(B*T/(t1-t0))} tok/s")
|
||||
|
||||
if not args.skip_test:
|
||||
# copy back to single gpu for test
|
||||
if args.gpus > 1:
|
||||
for x in nn.state.get_parameters(model): x.to_(Device.DEFAULT)
|
||||
start = "<|endoftext|>"
|
||||
start_ids = encode(start)
|
||||
x = (Tensor(start_ids)[None, ...])
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
# much taken from https://github.com/cloneofsimo/minRF
|
||||
from tinygrad import Tensor, nn, GlobalCounters, TinyJit
|
||||
from tinygrad.helpers import getenv, trange
|
||||
from extra.models.llama import Attention, FeedForward, precompute_freqs_cis
|
||||
|
||||
def modulate(x:Tensor, shift:Tensor, scale:Tensor) -> Tensor: return x * (1 + scale.unsqueeze(1)) + shift.unsqueeze(1)
|
||||
|
||||
# TODO: why doesn't the TimestepEmbedder from minRF work?
|
||||
class TimestepEmbedder:
|
||||
def __init__(self, hidden_size): self.mlp = [nn.Linear(1, hidden_size), Tensor.silu, nn.Linear(hidden_size, hidden_size)]
|
||||
def __call__(self, t:Tensor): return t.reshape(-1, 1).sequential(self.mlp)
|
||||
|
||||
class TransformerBlock:
|
||||
def __init__(self, dim, n_heads, norm_eps=1e-5):
|
||||
self.attention = Attention(dim, n_heads)
|
||||
self.feed_forward = FeedForward(dim, 4*dim)
|
||||
self.attention_norm = nn.LayerNorm(dim, eps=norm_eps)
|
||||
self.ffn_norm = nn.LayerNorm(dim, eps=norm_eps)
|
||||
self.adaLN_modulation = nn.Linear(dim, 6 * dim, bias=True)
|
||||
|
||||
def __call__(self, x:Tensor, freqs_cis:Tensor, adaln_input:Tensor):
|
||||
shift_msa, scale_msa, gate_msa, shift_mlp, scale_mlp, gate_mlp = self.adaLN_modulation(adaln_input.silu()).chunk(6, dim=1)
|
||||
x = x + gate_msa.unsqueeze(1) * self.attention(modulate(self.attention_norm(x), shift_msa, scale_msa), 0, freqs_cis)
|
||||
x = x + gate_mlp.unsqueeze(1) * self.feed_forward(modulate(self.ffn_norm(x), shift_mlp, scale_mlp))
|
||||
return x.contiguous().contiguous_backward()
|
||||
|
||||
class FinalLayer:
|
||||
def __init__(self, dim, patch_size, out_channels):
|
||||
self.norm_final = nn.LayerNorm(dim, elementwise_affine=False, eps=1e-6)
|
||||
self.linear = nn.Linear(dim, patch_size*patch_size*out_channels, bias=True)
|
||||
self.adaLN_modulation = nn.Linear(dim, 2 * dim, bias=True)
|
||||
|
||||
# init weights/bias to 0
|
||||
self.linear.weight.replace(self.linear.weight.zeros_like().contiguous())
|
||||
self.linear.bias.replace(self.linear.bias.zeros_like().contiguous())
|
||||
|
||||
def __call__(self, x:Tensor, c:Tensor):
|
||||
shift, scale = self.adaLN_modulation(c.silu()).chunk(2, dim=1)
|
||||
x = modulate(self.norm_final(x), shift, scale)
|
||||
return self.linear(x)
|
||||
|
||||
# channels=1, input_size=32, dim=64, n_layers=6, n_heads=4, num_classes=10
|
||||
class DiT_Llama:
|
||||
def __init__(self, in_channels=1, dim=64, n_layers=6, n_heads=4, num_classes=10, patch_size=2):
|
||||
self.patch_size = patch_size
|
||||
self.out_channels = in_channels
|
||||
self.num_classes = num_classes
|
||||
|
||||
self.init_conv_seq = [
|
||||
nn.Conv2d(in_channels, dim // 2, kernel_size=5, padding=2, stride=1), Tensor.silu, nn.GroupNorm(32, dim//2),
|
||||
nn.Conv2d(dim //2, dim // 2, kernel_size=5, padding=2, stride=1), Tensor.silu, nn.GroupNorm(32, dim//2),
|
||||
]
|
||||
|
||||
self.x_embedder = nn.Linear(self.patch_size * self.patch_size * dim // 2, dim, bias=True)
|
||||
self.t_embedder = TimestepEmbedder(dim)
|
||||
self.y_embedder = nn.Embedding(num_classes+1, dim)
|
||||
self.final_layer = FinalLayer(dim, self.patch_size, self.out_channels)
|
||||
|
||||
self.freqs_cis = precompute_freqs_cis(dim // n_heads, 4096)
|
||||
self.layers = [TransformerBlock(dim, n_heads) for _ in range(n_layers)]
|
||||
|
||||
def unpatchify(self, x:Tensor):
|
||||
c, p = self.out_channels, self.patch_size
|
||||
h = w = int(x.shape[1] ** 0.5)
|
||||
x = x.reshape(shape=(x.shape[0], h, w, p, p, c))
|
||||
x = x.rearrange("n h w p q c -> n c h p w q")
|
||||
return x.reshape(shape=(x.shape[0], c, h * p, h * p))
|
||||
|
||||
def patchify(self, x:Tensor):
|
||||
B, C, H, W = x.shape
|
||||
x = x.reshape(B, C, H // self.patch_size, self.patch_size, W // self.patch_size, self.patch_size)
|
||||
x = x.permute(0, 2, 4, 1, 3, 5).flatten(-3).flatten(1, 2)
|
||||
return x # B <H*W ish> <C*patch_size*patch_size>
|
||||
|
||||
def __call__(self, x:Tensor, t:Tensor, y:Tensor) -> Tensor:
|
||||
x = x.sequential(self.init_conv_seq)
|
||||
x = self.patchify(x)
|
||||
x = self.x_embedder(x)
|
||||
adaln_input = self.t_embedder(t) + self.y_embedder(y)
|
||||
adaln_input = adaln_input.contiguous()
|
||||
for layer in self.layers:
|
||||
x = layer(x, self.freqs_cis[:, :x.size(1)], adaln_input=adaln_input)
|
||||
x = self.final_layer(x, adaln_input)
|
||||
return self.unpatchify(x)
|
||||
|
||||
def rf(self, x:Tensor, cond:Tensor):
|
||||
b = x.shape[0]
|
||||
# self.ln is True
|
||||
t = Tensor.randn((b,)).sigmoid()
|
||||
texp = t.view([b, *([1] * len(x.shape[1:]))])
|
||||
|
||||
# conditional dropout
|
||||
dropout_prob = 0.1
|
||||
cond = (Tensor.rand(cond.shape[0]) < dropout_prob).where(cond.full_like(self.num_classes), cond)
|
||||
|
||||
# this is rectified flow
|
||||
z1 = x.randn_like()
|
||||
zt = (1 - texp) * x + texp * z1
|
||||
vtheta = self(zt, t, cond)
|
||||
|
||||
# MSE loss
|
||||
return ((z1 - x) - vtheta).square().mean()
|
||||
|
||||
def sample(self, z, cond, null_cond, sample_steps=50, cfg=2.0):
|
||||
b = z.size(0)
|
||||
dt = Tensor.full((b,)+(1,)*len(z.shape[1:]), fill_value=1.0/sample_steps).contiguous()
|
||||
images = [z]
|
||||
for i in range(sample_steps, 0, -1):
|
||||
t = Tensor.full((b,), fill_value=i/sample_steps).contiguous()
|
||||
vc = self(z, t, cond)
|
||||
vu = self(z, t, null_cond)
|
||||
vc = vu + cfg * (vc - vu)
|
||||
z = z - dt * vc
|
||||
z = z.contiguous()
|
||||
images.append(z)
|
||||
return images
|
||||
|
||||
def mviz(t:Tensor):
|
||||
assert len(t.shape) == 4 and t.shape[1] == 1
|
||||
ft = t.permute(1,2,0,3).reshape(32, -1)
|
||||
assert ft.shape[-1]%32 == 0
|
||||
print("")
|
||||
for y in ((ft+1)/2).clamp(0,1).tolist():
|
||||
ln = [f"\033[38;5;{232+int(x*23)}m██" for x in y]
|
||||
print(''.join(ln) + "\033[0m")
|
||||
|
||||
if __name__ == "__main__":
|
||||
X_train, Y_train, X_test, Y_test = nn.datasets.mnist()
|
||||
X_train = X_train.pad((2,2,2,2))
|
||||
X_train = ((X_train.float()/255)-0.5)/0.5
|
||||
Y_train = Y_train.int()
|
||||
|
||||
model = DiT_Llama(patch_size=getenv("PATCH_SIZE", 2))
|
||||
for r in nn.state.get_parameters(model): r.realize()
|
||||
optimizer = nn.optim.Adam(nn.state.get_parameters(model), lr=5e-4)
|
||||
|
||||
@TinyJit
|
||||
@Tensor.train()
|
||||
def train_step():
|
||||
if getenv("OVERFIT"): samples = Tensor.zeros(getenv("BS", 256), dtype='int')
|
||||
else: samples = Tensor.randint(getenv("BS", 256), high=X_train.shape[0])
|
||||
optimizer.zero_grad()
|
||||
loss = model.rf(X_train[samples], Y_train[samples])
|
||||
loss.backward()
|
||||
optimizer.step()
|
||||
return loss
|
||||
|
||||
@TinyJit
|
||||
def sample(z:Tensor, cond:Tensor) -> Tensor:
|
||||
return model.sample(z, cond, Tensor.full_like(cond, 10), sample_steps=getenv("SAMPLE_STEPS", 20))[-1]
|
||||
|
||||
for steps in (t:=trange(getenv("STEPS", 5000))):
|
||||
if steps%10 == 0: mviz(sample(Tensor.randn(3, 1, 32, 32), Tensor([5,0,4], dtype='int')))
|
||||
GlobalCounters.reset()
|
||||
loss = train_step()
|
||||
t.set_description(f"loss: {loss.item():9.2f}")
|
||||
+12
-15
@@ -3,7 +3,6 @@ from tinygrad import Tensor, nn, Device, GlobalCounters, Variable
|
||||
from tinygrad.helpers import Timing, Profiling, CI, tqdm
|
||||
from tinygrad.nn.state import torch_load, get_state_dict
|
||||
from extra.models.llama import FeedForward, Transformer
|
||||
from extra.bench_log import BenchEvent, WallTimeEvent
|
||||
|
||||
class MixtureFeedForward:
|
||||
def __init__(self, num_experts:int, dim:int, hidden_dim:int, linear=nn.Linear):
|
||||
@@ -31,19 +30,18 @@ if __name__ == "__main__":
|
||||
help="Path to the downloaded weights")
|
||||
args = parser.parse_args()
|
||||
|
||||
with WallTimeEvent(BenchEvent.LOAD_WEIGHTS):
|
||||
state = torch_load(args.weights + "/consolidated.00.pth.b")
|
||||
model = Transformer(n_layers=32, dim=4096, hidden_dim=14336, n_heads=32, n_kv_heads=8, norm_eps=1e-5, vocab_size=32000, feed_forward=functools.partial(MixtureFeedForward, 8), jit=False)
|
||||
model_state_dict = get_state_dict(model)
|
||||
state = torch_load(args.weights + "/consolidated.00.pth.b")
|
||||
model = Transformer(n_layers=32, dim=4096, hidden_dim=14336, n_heads=32, n_kv_heads=8, norm_eps=1e-5, vocab_size=32000, feed_forward=functools.partial(MixtureFeedForward, 8), jit=False)
|
||||
model_state_dict = get_state_dict(model)
|
||||
|
||||
for k in (t := tqdm(state, disable=CI)):
|
||||
if 'feed_forward.experts.' in k:
|
||||
expert_no = int(k.split('feed_forward.experts.')[1].split('.')[0])
|
||||
device = Device.DEFAULT + ":" + str((expert_no//2)+1)
|
||||
else:
|
||||
device = Device.DEFAULT
|
||||
t.set_description(f"ram used: {GlobalCounters.mem_used/1e9:5.2f} GB, loading {k} to {device}")
|
||||
model_state_dict[k].replace(state[k].to(device).half()).realize()
|
||||
for k in (t := tqdm(state, disable=CI)):
|
||||
if 'feed_forward.experts.' in k:
|
||||
expert_no = int(k.split('feed_forward.experts.')[1].split('.')[0])
|
||||
device = Device.DEFAULT + ":" + str((expert_no//2)+1)
|
||||
else:
|
||||
device = Device.DEFAULT
|
||||
t.set_description(f"ram used: {GlobalCounters.mem_used/1e9:5.2f} GB, loading {k} to {device}")
|
||||
model_state_dict[k].replace(state[k].to(device).half()).realize()
|
||||
if CI: print(f"ram used: {GlobalCounters.mem_used/1e9:5.2f} GB")
|
||||
|
||||
from sentencepiece import SentencePieceProcessor
|
||||
@@ -55,8 +53,7 @@ if __name__ == "__main__":
|
||||
GlobalCounters.reset()
|
||||
with Profiling(sort="time", frac=0.1, enabled=args.profile):
|
||||
with Timing("total ", enabled=args.timing, on_exit=lambda x: f", {1e9/x:.2f} tok/sec"):
|
||||
with WallTimeEvent(BenchEvent.STEP):
|
||||
tok = model(Tensor([toks[start_pos:]]), 0 if start_pos == 0 else Variable("start_pos", 1, 1024-1).bind(start_pos), args.temperature).item()
|
||||
tok = model(Tensor([toks[start_pos:]]), 0 if start_pos == 0 else Variable("start_pos", 1, 1024).bind(start_pos), args.temperature).item()
|
||||
toks.append(tok)
|
||||
start_pos += 1
|
||||
print(spp.decode(toks))
|
||||
|
||||
+24
-188
@@ -5,7 +5,7 @@ from multiprocessing import Queue, Process, shared_memory, connection, Lock, cpu
|
||||
|
||||
import numpy as np
|
||||
from tinygrad import dtypes, Tensor
|
||||
from tinygrad.helpers import getenv, prod, Context, round_up, tqdm, OSX
|
||||
from tinygrad.helpers import getenv, prod, Context, round_up, tqdm
|
||||
|
||||
### ResNet
|
||||
|
||||
@@ -67,11 +67,11 @@ def loader_process(q_in, q_out, X:Tensor, seed):
|
||||
|
||||
# broken out
|
||||
#img_tensor = Tensor(img.tobytes(), device='CPU')
|
||||
#storage_tensor = X[idx].contiguous().realize().lazydata.base.realized
|
||||
#storage_tensor = X[idx].contiguous().realize().lazydata.realized
|
||||
#storage_tensor._copyin(img_tensor.numpy())
|
||||
|
||||
# faster
|
||||
X[idx].contiguous().realize().uop.base.realized.as_buffer(force_zero_copy=True)[:] = img.tobytes()
|
||||
X[idx].contiguous().realize().lazydata.realized.as_buffer(force_zero_copy=True)[:] = img.tobytes()
|
||||
|
||||
# ideal
|
||||
#X[idx].assign(img.tobytes()) # NOTE: this is slow!
|
||||
@@ -129,15 +129,14 @@ def batch_load_resnet(batch_size=64, val=False, shuffle=True, seed=None, pad_fir
|
||||
q_in, q_out = Queue(), Queue()
|
||||
|
||||
sz = (batch_size*BATCH_COUNT, 224, 224, 3)
|
||||
shm_name = "resnet_X_val" if val else "resnet_X_train"
|
||||
if not OSX and os.path.exists(f"/dev/shm/{shm_name}"): os.unlink(f"/dev/shm/{shm_name}")
|
||||
shm = shared_memory.SharedMemory(name=shm_name, create=True, size=prod(sz))
|
||||
if os.path.exists("/dev/shm/resnet_X"): os.unlink("/dev/shm/resnet_X")
|
||||
shm = shared_memory.SharedMemory(name="resnet_X", create=True, size=prod(sz))
|
||||
procs = []
|
||||
|
||||
try:
|
||||
# disk:shm is slower
|
||||
if OSX: X = Tensor.empty(*sz, dtype=dtypes.uint8, device=f"disk:shm:{shm.name}")
|
||||
else: X = Tensor.empty(*sz, dtype=dtypes.uint8, device=f"disk:/dev/shm/{shm_name}")
|
||||
#X = Tensor.empty(*sz, dtype=dtypes.uint8, device=f"disk:shm:{shm.name}")
|
||||
X = Tensor.empty(*sz, dtype=dtypes.uint8, device=f"disk:/dev/shm/resnet_X")
|
||||
Y = [None] * (batch_size*BATCH_COUNT)
|
||||
|
||||
for _ in range(cpu_count()):
|
||||
@@ -171,13 +170,13 @@ def batch_load_resnet(batch_size=64, val=False, shuffle=True, seed=None, pad_fir
|
||||
|
||||
def process_batch_bert(data: List[dict]) -> dict[str, Tensor]:
|
||||
return {
|
||||
"input_ids": Tensor(np.concatenate([s["input_ids"] for s in data], axis=0), dtype=dtypes.int32, device="CPU"),
|
||||
"input_mask": Tensor(np.concatenate([s["input_mask"] for s in data], axis=0), dtype=dtypes.int32, device="CPU"),
|
||||
"segment_ids": Tensor(np.concatenate([s["segment_ids"] for s in data], axis=0), dtype=dtypes.int32, device="CPU"),
|
||||
"masked_lm_positions": Tensor(np.concatenate([s["masked_lm_positions"] for s in data], axis=0), dtype=dtypes.int32, device="CPU"),
|
||||
"masked_lm_ids": Tensor(np.concatenate([s["masked_lm_ids"] for s in data], axis=0), dtype=dtypes.int32, device="CPU"),
|
||||
"masked_lm_weights": Tensor(np.concatenate([s["masked_lm_weights"] for s in data], axis=0), dtype=dtypes.float32, device="CPU"),
|
||||
"next_sentence_labels": Tensor(np.concatenate([s["next_sentence_labels"] for s in data], axis=0), dtype=dtypes.int32, device="CPU"),
|
||||
"input_ids": Tensor(np.concatenate([s["input_ids"] for s in data], axis=0), dtype=dtypes.float32),
|
||||
"input_mask": Tensor(np.concatenate([s["input_mask"] for s in data], axis=0), dtype=dtypes.default_float),
|
||||
"segment_ids": Tensor(np.concatenate([s["segment_ids"] for s in data], axis=0), dtype=dtypes.float32),
|
||||
"masked_lm_positions": Tensor(np.concatenate([s["masked_lm_positions"] for s in data], axis=0), dtype=dtypes.float32),
|
||||
"masked_lm_ids": Tensor(np.concatenate([s["masked_lm_ids"] for s in data], axis=0), dtype=dtypes.float32),
|
||||
"masked_lm_weights": Tensor(np.concatenate([s["masked_lm_weights"] for s in data], axis=0), dtype=dtypes.float32),
|
||||
"next_sentence_labels": Tensor(np.concatenate([s["next_sentence_labels"] for s in data], axis=0), dtype=dtypes.float32),
|
||||
}
|
||||
|
||||
def load_file(file: str):
|
||||
@@ -224,8 +223,14 @@ def batch_load_train_bert(BS:int):
|
||||
assert cycle_length > 0, "cycle_length must be greater than 0"
|
||||
|
||||
dataset = InterleavedDataset(train_files, cycle_length)
|
||||
buffer = [dataset.get() for _ in range(1000)]
|
||||
while True:
|
||||
yield process_batch_bert([dataset.get() for _ in range(BS)])
|
||||
batch = []
|
||||
for _ in range(BS):
|
||||
index = random.randint(0, 999)
|
||||
batch.append(buffer[index])
|
||||
buffer[index] = dataset.get()
|
||||
yield process_batch_bert(batch)
|
||||
|
||||
# Reference: https://github.com/mlcommons/training/blob/1c8a098ae3e70962a4f7422c0b0bd35ae639e357/language_model/tensorflow/bert/run_pretraining.py, Line 416
|
||||
def batch_load_val_bert(BS:int):
|
||||
@@ -262,8 +267,8 @@ def load_unet3d_data(preprocessed_dataset_dir, seed, queue_in, queue_out, X:Tens
|
||||
x = random_brightness_augmentation(x)
|
||||
x = gaussian_noise(x)
|
||||
|
||||
X[idx].contiguous().realize().uop.base.realized.as_buffer(force_zero_copy=True)[:] = x.tobytes()
|
||||
Y[idx].contiguous().realize().uop.base.realized.as_buffer(force_zero_copy=True)[:] = y.tobytes()
|
||||
X[idx].contiguous().realize().lazydata.realized.as_buffer(force_zero_copy=True)[:] = x.tobytes()
|
||||
Y[idx].contiguous().realize().lazydata.realized.as_buffer(force_zero_copy=True)[:] = y.tobytes()
|
||||
|
||||
queue_out.put(idx)
|
||||
queue_out.put(None)
|
||||
@@ -313,7 +318,7 @@ def batch_load_unet3d(preprocessed_dataset_dir:Path, batch_size:int=6, val:bool=
|
||||
proc = Process(target=load_unet3d_data, args=(preprocessed_dataset_dir, seed, queue_in, queue_out, X, Y))
|
||||
proc.daemon = True
|
||||
proc.start()
|
||||
|
||||
|
||||
procs.append(proc)
|
||||
|
||||
for bc in range(batch_count):
|
||||
@@ -349,167 +354,6 @@ def batch_load_unet3d(preprocessed_dataset_dir:Path, batch_size:int=6, val:bool=
|
||||
# happens with BENCHMARK set
|
||||
pass
|
||||
|
||||
### RetinaNet
|
||||
|
||||
def load_retinanet_data(base_dir:Path, val:bool, queue_in:Queue, queue_out:Queue,
|
||||
imgs:Tensor, boxes:Tensor, labels:Tensor, matches:Tensor|None=None,
|
||||
anchors:Tensor|None=None, seed:int|None=None):
|
||||
from extra.datasets.openimages import image_load, random_horizontal_flip, resize
|
||||
from examples.mlperf.helpers import box_iou, find_matches, generate_anchors
|
||||
import torch
|
||||
|
||||
while (data:=queue_in.get()) is not None:
|
||||
idx, img, tgt = data
|
||||
img = image_load(base_dir, img["subset"], img["file_name"])
|
||||
|
||||
if val:
|
||||
img = resize(img)[0]
|
||||
else:
|
||||
if seed is not None:
|
||||
np.random.seed(seed)
|
||||
random.seed(seed)
|
||||
torch.manual_seed(seed)
|
||||
|
||||
img, tgt = random_horizontal_flip(img, tgt)
|
||||
img, tgt, _ = resize(img, tgt=tgt)
|
||||
match_quality_matrix = box_iou(tgt["boxes"], (anchor := np.concatenate(generate_anchors((800, 800)))))
|
||||
match_idxs = find_matches(match_quality_matrix, allow_low_quality_matches=True)
|
||||
clipped_match_idxs = np.clip(match_idxs, 0, None)
|
||||
clipped_boxes, clipped_labels = tgt["boxes"][clipped_match_idxs], tgt["labels"][clipped_match_idxs]
|
||||
|
||||
boxes[idx].contiguous().realize().uop.base.realized.as_buffer(force_zero_copy=True)[:] = clipped_boxes.tobytes()
|
||||
labels[idx].contiguous().realize().uop.base.realized.as_buffer(force_zero_copy=True)[:] = clipped_labels.tobytes()
|
||||
matches[idx].contiguous().realize().uop.base.realized.as_buffer(force_zero_copy=True)[:] = match_idxs.tobytes()
|
||||
anchors[idx].contiguous().realize().uop.base.realized.as_buffer(force_zero_copy=True)[:] = anchor.tobytes()
|
||||
|
||||
imgs[idx].contiguous().realize().uop.base.realized.as_buffer(force_zero_copy=True)[:] = img.tobytes()
|
||||
|
||||
queue_out.put(idx)
|
||||
queue_out.put(None)
|
||||
|
||||
def batch_load_retinanet(dataset, val:bool, base_dir:Path, batch_size:int=32, shuffle:bool=True, seed:int|None=None):
|
||||
def _enqueue_batch(bc):
|
||||
from extra.datasets.openimages import prepare_target
|
||||
for idx in range(bc * batch_size, (bc+1) * batch_size):
|
||||
img = dataset.loadImgs(next(dataset_iter))[0]
|
||||
ann = dataset.loadAnns(dataset.getAnnIds(img_id:=img["id"]))
|
||||
tgt = prepare_target(ann, img_id, (img["height"], img["width"]))
|
||||
|
||||
if img_ids is not None:
|
||||
img_ids[idx] = img_id
|
||||
|
||||
if img_sizes is not None:
|
||||
img_sizes[idx] = tgt["image_size"]
|
||||
|
||||
queue_in.put((idx, img, tgt))
|
||||
|
||||
def _setup_shared_mem(shm_name:str, size:tuple[int, ...], dtype:dtypes) -> tuple[shared_memory.SharedMemory, Tensor]:
|
||||
if os.path.exists(f"/dev/shm/{shm_name}"): os.unlink(f"/dev/shm/{shm_name}")
|
||||
shm = shared_memory.SharedMemory(name=shm_name, create=True, size=prod(size))
|
||||
shm_tensor = Tensor.empty(*size, dtype=dtype, device=f"disk:/dev/shm/{shm_name}")
|
||||
return shm, shm_tensor
|
||||
|
||||
image_ids = sorted(dataset.imgs.keys())
|
||||
batch_count = min(32, len(image_ids) // batch_size)
|
||||
|
||||
queue_in, queue_out = Queue(), Queue()
|
||||
procs, data_out_count = [], [0] * batch_count
|
||||
|
||||
shm_imgs, imgs = _setup_shared_mem("retinanet_imgs", (batch_size * batch_count, 800, 800, 3), dtypes.uint8)
|
||||
|
||||
if val:
|
||||
boxes, labels, matches, anchors = None, None, None, None
|
||||
img_ids, img_sizes = [None] * (batch_size * batch_count), [None] * (batch_size * batch_count)
|
||||
else:
|
||||
img_ids, img_sizes = None, None
|
||||
shm_boxes, boxes = _setup_shared_mem("retinanet_boxes", (batch_size * batch_count, 120087, 4), dtypes.float32)
|
||||
shm_labels, labels = _setup_shared_mem("retinanet_labels", (batch_size * batch_count, 120087), dtypes.int64)
|
||||
shm_matches, matches = _setup_shared_mem("retinanet_matches", (batch_size * batch_count, 120087), dtypes.int64)
|
||||
shm_anchors, anchors = _setup_shared_mem("retinanet_anchors", (batch_size * batch_count, 120087, 4), dtypes.float64)
|
||||
|
||||
shutdown = False
|
||||
class Cookie:
|
||||
def __init__(self, bc):
|
||||
self.bc = bc
|
||||
def __del__(self):
|
||||
if not shutdown:
|
||||
try: _enqueue_batch(self.bc)
|
||||
except StopIteration: pass
|
||||
|
||||
def shuffle_indices(indices, seed):
|
||||
rng = random.Random(seed)
|
||||
rng.shuffle(indices)
|
||||
|
||||
if shuffle: shuffle_indices(image_ids, seed=seed)
|
||||
dataset_iter = iter(image_ids)
|
||||
|
||||
try:
|
||||
for _ in range(cpu_count()):
|
||||
proc = Process(
|
||||
target=load_retinanet_data,
|
||||
args=(base_dir, val, queue_in, queue_out, imgs, boxes, labels),
|
||||
kwargs={"matches": matches, "anchors": anchors, "seed": seed}
|
||||
)
|
||||
proc.daemon = True
|
||||
proc.start()
|
||||
procs.append(proc)
|
||||
|
||||
for bc in range(batch_count):
|
||||
_enqueue_batch(bc)
|
||||
|
||||
for _ in range(len(image_ids) // batch_size):
|
||||
while True:
|
||||
bc = queue_out.get() // batch_size
|
||||
data_out_count[bc] += 1
|
||||
if data_out_count[bc] == batch_size: break
|
||||
|
||||
data_out_count[bc] = 0
|
||||
|
||||
if val:
|
||||
yield (imgs[bc * batch_size:(bc + 1) * batch_size],
|
||||
img_ids[bc * batch_size:(bc + 1) * batch_size],
|
||||
img_sizes[bc * batch_size:(bc + 1) * batch_size],
|
||||
Cookie(bc))
|
||||
else:
|
||||
yield (imgs[bc * batch_size:(bc + 1) * batch_size],
|
||||
boxes[bc * batch_size:(bc + 1) * batch_size],
|
||||
labels[bc * batch_size:(bc + 1) * batch_size],
|
||||
matches[bc * batch_size:(bc + 1) * batch_size],
|
||||
anchors[bc * batch_size:(bc + 1) * batch_size],
|
||||
Cookie(bc))
|
||||
finally:
|
||||
shutdown = True
|
||||
|
||||
for _ in procs: queue_in.put(None)
|
||||
queue_in.close()
|
||||
|
||||
for _ in procs:
|
||||
while queue_out.get() is not None: pass
|
||||
queue_out.close()
|
||||
|
||||
# shutdown processes
|
||||
for proc in procs: proc.join()
|
||||
|
||||
shm_imgs.close()
|
||||
|
||||
if not val:
|
||||
shm_boxes.close()
|
||||
shm_labels.close()
|
||||
shm_matches.close()
|
||||
shm_anchors.close()
|
||||
|
||||
try:
|
||||
shm_imgs.unlink()
|
||||
|
||||
if not val:
|
||||
shm_boxes.unlink()
|
||||
shm_labels.unlink()
|
||||
shm_matches.unlink()
|
||||
shm_anchors.unlink()
|
||||
except FileNotFoundError:
|
||||
# happens with BENCHMARK set
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
def load_unet3d(val):
|
||||
assert not val, "validation set is not supported due to different sizes on inputs"
|
||||
@@ -530,14 +374,6 @@ if __name__ == "__main__":
|
||||
for x,y,c in batch_load_resnet(val=val):
|
||||
pbar.update(x.shape[0])
|
||||
|
||||
def load_retinanet(val):
|
||||
from extra.datasets.openimages import BASEDIR, download_dataset
|
||||
from pycocotools.coco import COCO
|
||||
dataset = COCO(download_dataset(base_dir:=getenv("BASEDIR", BASEDIR), "validation" if val else "train"))
|
||||
with tqdm(total=len(dataset.imgs.keys())) as pbar:
|
||||
for x in batch_load_retinanet(dataset, val, base_dir):
|
||||
pbar.update(x[0].shape[0])
|
||||
|
||||
load_fn_name = f"load_{getenv('MODEL', 'resnet')}"
|
||||
if load_fn_name in globals():
|
||||
globals()[load_fn_name](getenv("VAL", 1))
|
||||
|
||||
+29
-145
@@ -1,7 +1,6 @@
|
||||
from collections import OrderedDict
|
||||
import unicodedata
|
||||
from typing import Optional
|
||||
import math
|
||||
import numpy as np
|
||||
from tinygrad.nn import state
|
||||
from tinygrad.tensor import Tensor, dtypes
|
||||
@@ -196,161 +195,46 @@ def get_bert_qa_prediction(features, example, start_end_logits):
|
||||
return "empty"
|
||||
|
||||
def get_mlperf_bert_config():
|
||||
"""benchmark is BERT-large"""
|
||||
ret = {"attention_probs_dropout_prob": 0.1, "hidden_dropout_prob": 0.1, "vocab_size": 30522, "type_vocab_size": 2, "max_position_embeddings": 512}
|
||||
"""Config is BERT-large"""
|
||||
return {
|
||||
"attention_probs_dropout_prob": 0.1,
|
||||
"hidden_dropout_prob": 0.1,
|
||||
"hidden_size": 1024,
|
||||
"intermediate_size": 4096,
|
||||
"max_position_embeddings": 512,
|
||||
"num_attention_heads": 16,
|
||||
"num_hidden_layers": 24,
|
||||
"type_vocab_size": 2,
|
||||
"vocab_size": 30522
|
||||
}
|
||||
|
||||
match (bert_size:=getenv("BERT_SIZE", "large")):
|
||||
case "large": ret.update({"hidden_size": 1024, "intermediate_size": 4096, "num_attention_heads": 16, "num_hidden_layers": 24})
|
||||
case "tiny": ret.update({"hidden_size": 128, "intermediate_size": 512, "num_attention_heads": 2, "num_hidden_layers": 2})
|
||||
case _: raise RuntimeError(f"unhandled {bert_size=}")
|
||||
|
||||
if (bert_layers:=getenv("BERT_LAYERS")): ret["num_hidden_layers"] = bert_layers
|
||||
return ret
|
||||
|
||||
def get_mlperf_bert_model():
|
||||
def get_mlperf_bert_model(checkpoint_path:Optional[str]=None):
|
||||
from extra.models import bert
|
||||
from examples.mlperf.initializers import LinearBert, EmbeddingBert, LayerNormBert
|
||||
|
||||
bert.Linear = LinearBert
|
||||
bert.Embedding = EmbeddingBert
|
||||
bert.Embedding = EmbeddingBert
|
||||
bert.LayerNorm = LayerNormBert
|
||||
|
||||
from extra.models.bert import BertForPretraining
|
||||
config = get_mlperf_bert_config()
|
||||
if getenv("DISABLE_DROPOUT", 0):
|
||||
config["hidden_dropout_prob"] = config["attention_probs_dropout_prob"] = 0.0
|
||||
return BertForPretraining(**config)
|
||||
model = BertForPretraining(**config)
|
||||
return model.load_from_pretrained(checkpoint_path) if checkpoint_path else model
|
||||
|
||||
def get_fake_data_bert(BS:int):
|
||||
def get_data_bert(GPUS:list[str], it):
|
||||
data: dict[str, Tensor] = next(it)
|
||||
for key in data.keys(): data[key].shard_(GPUS, axis=0)
|
||||
return data
|
||||
|
||||
def get_fake_data_bert(GPUS:list[str], BS:int):
|
||||
return {
|
||||
"input_ids": Tensor.empty((BS, 512), dtype=dtypes.int32, device="CPU"),
|
||||
"input_mask": Tensor.empty((BS, 512), dtype=dtypes.int32, device="CPU"),
|
||||
"segment_ids": Tensor.empty((BS, 512), dtype=dtypes.int32, device="CPU"),
|
||||
"masked_lm_positions": Tensor.empty((BS, 76), dtype=dtypes.int32, device="CPU"),
|
||||
"masked_lm_ids": Tensor.empty((BS, 76), dtype=dtypes.int32, device="CPU"),
|
||||
"masked_lm_weights": Tensor.empty((BS, 76), dtype=dtypes.float32, device="CPU"),
|
||||
"next_sentence_labels": Tensor.empty((BS, 1), dtype=dtypes.int32, device="CPU"),
|
||||
"input_ids": Tensor.empty((BS, 512), dtype=dtypes.float32).contiguous().shard_(GPUS, axis=0),
|
||||
"input_mask": Tensor.empty((BS, 512), dtype=dtypes.default_float).contiguous().shard_(GPUS, axis=0),
|
||||
"segment_ids": Tensor.empty((BS, 512), dtype=dtypes.float32).contiguous().shard_(GPUS, axis=0),
|
||||
"masked_lm_positions": Tensor.empty((BS, 76), dtype=dtypes.float32).contiguous().shard_(GPUS, axis=0),
|
||||
"masked_lm_ids": Tensor.empty((BS, 76), dtype=dtypes.float32).contiguous().shard_(GPUS, axis=0),
|
||||
"masked_lm_weights": Tensor.empty((BS, 76), dtype=dtypes.float32).contiguous().shard_(GPUS, axis=0),
|
||||
"next_sentence_labels": Tensor.empty((BS, 1), dtype=dtypes.float32).contiguous().shard_(GPUS, axis=0),
|
||||
}
|
||||
|
||||
def find_matches(match_quality_matrix:np.ndarray, high_threshold:float=0.5, low_threshold:float=0.4, allow_low_quality_matches:bool=False) -> np.ndarray:
|
||||
BELOW_LOW_THRESHOLD, BETWEEN_THRESHOLDS = -1, -2
|
||||
|
||||
def _set_low_quality_matches_(matches:np.ndarray, all_matches:np.ndarray, match_quality_matrix:np.ndarray):
|
||||
highest_quality_foreach_gt = np.max(match_quality_matrix, axis=1)
|
||||
pred_inds_to_update = np.nonzero(match_quality_matrix == highest_quality_foreach_gt[:, None])[1]
|
||||
matches[pred_inds_to_update] = all_matches[pred_inds_to_update]
|
||||
|
||||
assert low_threshold <= high_threshold
|
||||
|
||||
matched_vals, matches = match_quality_matrix.max(axis=0), match_quality_matrix.argmax(axis=0)
|
||||
all_matches = np.copy(matches) if allow_low_quality_matches else None
|
||||
below_low_threshold = matched_vals < low_threshold
|
||||
between_thresholds = (matched_vals >= low_threshold) & (matched_vals < high_threshold)
|
||||
matches[below_low_threshold] = BELOW_LOW_THRESHOLD
|
||||
matches[between_thresholds] = BETWEEN_THRESHOLDS
|
||||
|
||||
if allow_low_quality_matches:
|
||||
assert all_matches is not None
|
||||
_set_low_quality_matches_(matches, all_matches, match_quality_matrix)
|
||||
|
||||
return matches
|
||||
|
||||
def box_iou(boxes1:np.ndarray, boxes2:np.ndarray) -> np.ndarray:
|
||||
def _box_area(boxes:np.ndarray) -> np.ndarray: return (boxes[:, 2] - boxes[:, 0]) * (boxes[:, 3] - boxes[:, 1])
|
||||
|
||||
def _box_inter_union(boxes1:np.ndarray, boxes2:np.ndarray) -> tuple[np.ndarray, np.ndarray]:
|
||||
area1, area2 = _box_area(boxes1), _box_area(boxes2)
|
||||
lt, rb = np.maximum(boxes1[:, None, :2], boxes2[:, :2]), np.minimum(boxes1[:, None, 2:], boxes2[:, 2:])
|
||||
wh = np.clip(rb - lt, a_min=0, a_max=None)
|
||||
inter = wh[:, :, 0] * wh[:, :, 1]
|
||||
union = area1[:, None] + area2 - inter
|
||||
return inter, union
|
||||
|
||||
inter, union = _box_inter_union(boxes1, boxes2)
|
||||
return inter / union
|
||||
|
||||
def generate_anchors(input_size:tuple[int, int], scales:Optional[tuple[Tensor, ...]]=None, aspect_ratios:Optional[tuple[Tensor, ...]]=None) -> list[np.ndarray]:
|
||||
def _compute_grid_sizes(input_size:tuple[int, int]) -> np.ndarray:
|
||||
return np.ceil(np.array(input_size)[None, :] / 2 ** np.arange(3, 8)[:, None])
|
||||
|
||||
scales = tuple((i, int(i * 2 ** (1/3)), int(i * 2 ** (2/3))) for i in 2 ** np.arange(5, 10)) if scales is None else scales
|
||||
aspect_ratios = ((0.5, 1.0, 2.0),) * len(scales) if aspect_ratios is None else aspect_ratios
|
||||
aspect_ratios = tuple(ar for ar in aspect_ratios)
|
||||
grid_sizes = _compute_grid_sizes(input_size)
|
||||
|
||||
assert len(scales) == len(aspect_ratios) == len(grid_sizes), "scales, aspect_ratios, and grid_sizes must have the same length"
|
||||
|
||||
anchors = []
|
||||
for s, ar, gs in zip(scales, aspect_ratios, grid_sizes):
|
||||
s, ar = np.array(s), np.array(ar)
|
||||
h_ratios = np.sqrt(ar)
|
||||
w_ratios = 1 / h_ratios
|
||||
ws = (w_ratios[:, None] * s[None, :]).reshape(-1)
|
||||
hs = (h_ratios[:, None] * s[None, :]).reshape(-1)
|
||||
base_anchors = (np.stack([-ws, -hs, ws, hs], axis=1) / 2).round()
|
||||
stride_h, stride_w = input_size[0] // gs[0], input_size[1] // gs[1]
|
||||
shifts_x, shifts_y = np.meshgrid(np.arange(gs[1]) * stride_w, np.arange(gs[0]) * stride_h)
|
||||
shifts_x, shifts_y = shifts_x.reshape(-1), shifts_y.reshape(-1)
|
||||
shifts = np.stack([shifts_x, shifts_y, shifts_x, shifts_y], axis=1, dtype=np.float32)
|
||||
anchors.append((shifts[:, None] + base_anchors[None, :]).reshape(-1, 4))
|
||||
|
||||
return anchors
|
||||
|
||||
|
||||
class BoxCoder(object):
|
||||
def __init__(self, weights, bbox_xform_clip=math.log(1000. / 16), apply_to_remove=True):
|
||||
self.weights = weights
|
||||
self.bbox_xform_clip = bbox_xform_clip
|
||||
self.apply_to_remove = apply_to_remove
|
||||
|
||||
def encode(self, reference_boxes, proposals):
|
||||
TO_REMOVE = self.apply_to_remove # TODO remove
|
||||
ex_widths = proposals[..., 2] - proposals[..., 0] + TO_REMOVE
|
||||
ex_heights = proposals[..., 3] - proposals[..., 1] + TO_REMOVE
|
||||
ex_ctr_x = proposals[..., 0] + 0.5 * ex_widths
|
||||
ex_ctr_y = proposals[..., 1] + 0.5 * ex_heights
|
||||
|
||||
gt_widths = reference_boxes[..., 2] - reference_boxes[..., 0] + TO_REMOVE
|
||||
gt_heights = reference_boxes[..., 3] - reference_boxes[..., 1] + TO_REMOVE
|
||||
gt_ctr_x = reference_boxes[..., 0] + 0.5 * gt_widths
|
||||
gt_ctr_y = reference_boxes[..., 1] + 0.5 * gt_heights
|
||||
|
||||
wx, wy, ww, wh = self.weights
|
||||
targets_dx = wx * (gt_ctr_x - ex_ctr_x) / ex_widths
|
||||
targets_dy = wy * (gt_ctr_y - ex_ctr_y) / ex_heights
|
||||
targets_dw = ww * Tensor.log(gt_widths / ex_widths)
|
||||
targets_dh = wh * Tensor.log(gt_heights / ex_heights)
|
||||
|
||||
targets = Tensor.stack(targets_dx, targets_dy, targets_dw, targets_dh, dim=-1)
|
||||
return targets
|
||||
|
||||
def decode(self, rel_codes, boxes):
|
||||
boxes = boxes.cast(rel_codes.dtype)
|
||||
rel_codes = rel_codes
|
||||
|
||||
TO_REMOVE = self.apply_to_remove # TODO remove
|
||||
widths = boxes[:, 2] - boxes[:, 0] + TO_REMOVE
|
||||
heights = boxes[:, 3] - boxes[:, 1] + TO_REMOVE
|
||||
ctr_x = boxes[:, 0] + 0.5 * widths
|
||||
ctr_y = boxes[:, 1] + 0.5 * heights
|
||||
|
||||
wx, wy, ww, wh = self.weights
|
||||
dx = rel_codes[:, 0::4] / wx
|
||||
dy = rel_codes[:, 1::4] / wy
|
||||
dw = rel_codes[:, 2::4] / ww
|
||||
dh = rel_codes[:, 3::4] / wh
|
||||
|
||||
# Prevent sending too large values into Tensor.exp()
|
||||
dw = dw.clip(min_=dw.min(), max_=self.bbox_xform_clip)
|
||||
dh = dh.clip(min_=dh.min(), max_=self.bbox_xform_clip)
|
||||
|
||||
pred_ctr_x = dx * widths[:, None] + ctr_x[:, None]
|
||||
pred_ctr_y = dy * heights[:, None] + ctr_y[:, None]
|
||||
pred_w = dw.exp() * widths[:, None]
|
||||
pred_h = dh.exp() * heights[:, None]
|
||||
x = pred_ctr_x - 0.5 * pred_w
|
||||
y = pred_ctr_y - 0.5 * pred_h
|
||||
w = pred_ctr_x + 0.5 * pred_w - 1
|
||||
h = pred_ctr_y + 0.5 * pred_h - 1
|
||||
pred_boxes = Tensor.stack(x, y, w, h).permute(1,2,0).reshape(rel_codes.shape[0], rel_codes.shape[1])
|
||||
return pred_boxes
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import math
|
||||
from typing import Union
|
||||
from typing import Union, Tuple
|
||||
|
||||
from tinygrad import Tensor, nn, dtypes
|
||||
from tinygrad.helpers import prod, argfix
|
||||
@@ -39,7 +39,7 @@ class LinearBert(nn.Linear):
|
||||
def __init__(self, in_features, out_features, bias=True, std=0.02):
|
||||
self.weight = std * rand_truncn(out_features, in_features, dtype=dtypes.float32)
|
||||
self.bias = Tensor.zeros(out_features, dtype=dtypes.float32) if bias else None
|
||||
|
||||
|
||||
def __call__(self, x:Tensor):
|
||||
return x.cast(dtypes.default_float).linear(self.weight.cast(dtypes.default_float).transpose(), self.bias.cast(dtypes.default_float) if self.bias is not None else None)
|
||||
|
||||
@@ -53,12 +53,10 @@ class EmbeddingBert(nn.Embedding):
|
||||
arange_shp, weight_shp, big_shp = (1, 1, self.vocab_sz, 1), (1, 1, self.vocab_sz, self.embed_sz), idx.shape+(self.vocab_sz, self.embed_sz,)
|
||||
if not hasattr(self, 'arange'): self.arange = Tensor.arange(self.vocab_sz, requires_grad=False, device=self.weight.device).reshape(arange_shp)
|
||||
arange, idx, vals = self.arange.expand(big_shp), idx.reshape(idx.shape+(1, 1,)).expand(big_shp), self.weight.cast(dtypes.default_float).reshape(weight_shp).expand(big_shp)
|
||||
# TODO: contiguous() here because the embedding dropout creates different asts on each device, and search becomes very slow.
|
||||
# Should fix with fixing random ast on multi device, and fuse arange to make embedding fast.
|
||||
return (arange == idx).mul(vals).sum(2, dtype=vals.dtype).contiguous()
|
||||
return (arange == idx).mul(vals).sum(2, acc_dtype=vals.dtype)
|
||||
|
||||
class LayerNormBert:
|
||||
def __init__(self, normalized_shape:Union[int, tuple[int, ...]], eps:float=1e-12, elementwise_affine:bool=True):
|
||||
def __init__(self, normalized_shape:Union[int, Tuple[int, ...]], eps:float=1e-12, elementwise_affine:bool=True):
|
||||
self.normalized_shape = (normalized_shape,) if isinstance(normalized_shape, int) else tuple(normalized_shape)
|
||||
self.axis, self.eps, self.elementwise_affine = tuple(-1-i for i in range(len(self.normalized_shape))), eps, elementwise_affine
|
||||
self.weight, self.bias = (Tensor.ones(*self.normalized_shape, dtype=dtypes.float32), Tensor.zeros(*self.normalized_shape, dtype=dtypes.float32)) if elementwise_affine else (None, None)
|
||||
@@ -68,62 +66,3 @@ class LayerNormBert:
|
||||
xn = x.cast(dtypes.float32).layernorm(eps=self.eps, axis=self.axis).cast(x.dtype)
|
||||
if not self.elementwise_affine: return xn
|
||||
return (xn * self.weight.cast(dtypes.default_float) + self.bias.cast(dtypes.default_float))
|
||||
|
||||
class FrozenBatchNorm2dRetinaNet(nn.BatchNorm2d):
|
||||
def __init__(self, sz:int, eps=1e-5, affine=True, track_running_stats=True, momentum=0.1):
|
||||
self.eps, self.track_running_stats, self.momentum = eps, track_running_stats, momentum
|
||||
|
||||
self.weight = Tensor.ones(sz, dtype=dtypes.float32, requires_grad=False) if affine else None
|
||||
self.bias = Tensor.zeros(sz, dtype=dtypes.float32, requires_grad=False) if affine else None
|
||||
|
||||
if track_running_stats: self.running_mean, self.running_var = Tensor.zeros(sz, dtype=dtypes.float32, requires_grad=False), Tensor.ones(sz, dtype=dtypes.float32, requires_grad=False)
|
||||
self.num_batches_tracked = Tensor.zeros(1, dtype=dtypes.long, requires_grad=False)
|
||||
|
||||
def __call__(self, x:Tensor) -> Tensor:
|
||||
batch_mean, batch_var = super().calc_stats(x.cast(dtypes.float32))
|
||||
if self.track_running_stats and Tensor.training:
|
||||
self.running_mean.assign((1-self.momentum) * self.running_mean + self.momentum * batch_mean.detach().cast(self.running_mean.dtype))
|
||||
self.running_var.assign((1-self.momentum) * self.running_var + self.momentum * x.numel()/(x.numel()-x.shape[1]) * batch_var.detach().cast(self.running_var.dtype))
|
||||
self.num_batches_tracked += 1
|
||||
return x.cast(dtypes.float32).batchnorm(self.weight, self.bias, batch_mean, batch_var.add(self.eps).rsqrt()).cast(x.dtype)
|
||||
|
||||
class Conv2dNormalRetinaNet(nn.Conv2d):
|
||||
def __init__(self, in_channels:int, out_channels:int, kernel_size:int|tuple[int, ...],
|
||||
stride:int=1, padding:int|tuple[int, ...]|str=0, dilation:int=1, groups:int=1,
|
||||
bias:bool=True, prior_prob:float|None=None):
|
||||
super().__init__(in_channels, out_channels, kernel_size, stride=stride, padding=padding, dilation=dilation, groups=groups, bias=bias)
|
||||
self.weight = Tensor.normal(*self.weight.shape, std=0.01, dtype=dtypes.float32)
|
||||
if bias:
|
||||
if prior_prob:
|
||||
prior_prob = Tensor(prior_prob, device=self.bias.device, dtype=dtypes.float32).expand(*self.bias.shape)
|
||||
self.bias = -(((1 - prior_prob) / prior_prob).log())
|
||||
else: self.bias = Tensor.zeros_like(self.bias, dtype=dtypes.float32)
|
||||
|
||||
def __call__(self, x:Tensor) -> Tensor:
|
||||
return x.conv2d(self.weight.cast(dtypes.default_float), self.bias.cast(dtypes.default_float) if self.bias is not None else None,
|
||||
groups=self.groups, stride=self.stride, padding=self.padding)
|
||||
|
||||
class Conv2dKaimingUniformRetinaNet(nn.Conv2d):
|
||||
def __init__(self, in_channels:int, out_channels:int, kernel_size:int|tuple[int, ...],
|
||||
stride:int=1, padding:int|tuple[int, ...]|str=0, dilation:int=1, groups:int=1,
|
||||
bias:bool=True):
|
||||
super().__init__(in_channels, out_channels, kernel_size, stride=stride, padding=padding, dilation=dilation, groups=groups, bias=bias)
|
||||
self.weight = Tensor.kaiming_uniform(*self.weight.shape, a=1, dtype=dtypes.float32)
|
||||
if bias: self.bias = Tensor.zeros_like(self.bias, dtype=dtypes.float32)
|
||||
|
||||
def __call__(self, x:Tensor) -> Tensor:
|
||||
return x.conv2d(self.weight.cast(dtypes.default_float), self.bias.cast(dtypes.default_float) if self.bias is not None else None,
|
||||
groups=self.groups, stride=self.stride, padding=self.padding)
|
||||
|
||||
class Conv2dRetinaNet(nn.Conv2d):
|
||||
def __init__(self, in_channels:int, out_channels:int, kernel_size:int|tuple[int, ...],
|
||||
stride:int=1, padding:int|tuple[int, ...]|str=0, dilation:int=1, groups:int=1,
|
||||
bias:bool=True):
|
||||
super().__init__(in_channels, out_channels, kernel_size, stride=stride, padding=padding, dilation=dilation, groups=groups, bias=bias)
|
||||
scale = 1 / math.sqrt(in_channels * prod(self.kernel_size))
|
||||
self.weight = Tensor.uniform(out_channels, in_channels//groups, *self.kernel_size, low=-scale, high=scale, dtype=dtypes.float32)
|
||||
self.bias: Tensor|None = Tensor.uniform(out_channels, low=-scale, high=scale, dtype=dtypes.float32) if bias else None
|
||||
|
||||
def __call__(self, x:Tensor) -> Tensor:
|
||||
return x.conv2d(self.weight.cast(dtypes.default_float), self.bias.cast(dtypes.default_float) if self.bias is not None else None,
|
||||
groups=self.groups, stride=self.stride, dilation=self.dilation, padding=self.padding)
|
||||
|
||||
@@ -1,29 +1,6 @@
|
||||
from examples.mlperf.metrics import dice_score
|
||||
from tinygrad import Tensor
|
||||
|
||||
def dice_ce_loss(pred, tgt):
|
||||
ce = pred.permute(0, 2, 3, 4, 1).sparse_categorical_crossentropy(tgt.squeeze(1))
|
||||
dice = (1.0 - dice_score(pred, tgt, argmax=False, to_one_hot_x=False)).mean()
|
||||
return (dice + ce) / 2
|
||||
|
||||
def sigmoid_focal_loss(pred:Tensor, tgt:Tensor, alpha:float=0.25, gamma:float=2.0, reduction:str="none") -> Tensor:
|
||||
assert reduction in ["mean", "sum", "none"], f"unsupported reduction {reduction}"
|
||||
p, ce_loss = pred.sigmoid(), pred.binary_crossentropy_logits(tgt, reduction="none")
|
||||
p_t = p * tgt + (1 - p) * (1 - tgt)
|
||||
loss = ce_loss * ((1 - p_t) ** gamma)
|
||||
|
||||
if alpha >= 0:
|
||||
alpha_t = alpha * tgt + (1 - alpha) * (1 - tgt)
|
||||
loss = loss * alpha_t
|
||||
|
||||
if reduction == "mean": loss = loss.mean()
|
||||
elif reduction == "sum": loss = loss.sum()
|
||||
return loss
|
||||
|
||||
def l1_loss(pred:Tensor, tgt:Tensor, reduction:str="none") -> Tensor:
|
||||
assert reduction in ["mean", "sum", "none"], f"unsupported reduction {reduction}"
|
||||
loss = (pred - tgt).abs()
|
||||
|
||||
if reduction == "mean": loss = loss.mean()
|
||||
elif reduction == "sum": loss = loss.sum()
|
||||
return loss
|
||||
@@ -1,5 +1,4 @@
|
||||
import math
|
||||
from tinygrad import dtypes
|
||||
from tinygrad import Tensor, dtypes
|
||||
from tinygrad.nn.optim import Optimizer
|
||||
|
||||
from extra.lr_scheduler import LR_Scheduler
|
||||
@@ -21,19 +20,3 @@ class PolynomialDecayWithWarmup(LR_Scheduler):
|
||||
warmup_lr = (self.epoch_counter * (1.0 / self.warmup)) * self.initial_lr
|
||||
x = (1 - (self.epoch_counter - self.warmup) / (self.epochs - self.warmup + 1))
|
||||
return (self.epoch_counter <= self.warmup).where(warmup_lr, (self.initial_lr - self.end_lr) * x ** self.power + self.end_lr).cast(self.optimizer.lr.dtype)
|
||||
|
||||
class CosineAnnealingLRWithWarmup(LR_Scheduler):
|
||||
def __init__(self, optimizer:Optimizer, base_lr, end_lr, warmup_steps:int, decay_steps:int):
|
||||
assert warmup_steps > 0 and decay_steps > 0
|
||||
super().__init__(optimizer)
|
||||
self.base_lr = base_lr
|
||||
self.end_lr = end_lr
|
||||
self.warmup_steps = warmup_steps
|
||||
self.decay_steps = decay_steps
|
||||
# set lr for first warmup step
|
||||
self.optimizer.lr.assign(self.get_lr()).realize()
|
||||
|
||||
def get_lr(self):
|
||||
warmup_lr = ((self.epoch_counter+1) / self.warmup_steps) * self.base_lr
|
||||
decay_lr = self.end_lr + 0.5 * (self.base_lr-self.end_lr) * (1 + (((self.epoch_counter+1-self.warmup_steps)/self.decay_steps) * math.pi).cos())
|
||||
return (self.epoch_counter < self.warmup_steps).where(warmup_lr, decay_lr).cast(self.optimizer.lr.dtype)
|
||||
@@ -1,6 +1,6 @@
|
||||
import re, string
|
||||
import re
|
||||
import string
|
||||
from collections import Counter
|
||||
from tinygrad import Tensor
|
||||
|
||||
def levenshtein(a, b):
|
||||
n, m = len(a), len(b)
|
||||
@@ -59,11 +59,3 @@ def f1_score(x, y):
|
||||
p = ns / len(xt)
|
||||
r = ns / len(yt)
|
||||
return 2 * p * r / (p + r)
|
||||
|
||||
def log_perplexity(logit:Tensor, target:Tensor, ignore_index:int|None=None):
|
||||
# logit has shape (n_samples, seq_len, vocab_size), target has shape (n_samples, seq_len)
|
||||
assert logit.ndim == 3, logit.ndim
|
||||
assert target.ndim == 2, target.ndim
|
||||
assert logit.shape[:2] == target.shape, f"{logit.shape[:2]=}, {target.shape=}"
|
||||
log_prob = logit.log_softmax(axis=-1)
|
||||
return log_prob.transpose(1, 2).nll_loss(target, ignore_index=ignore_index)
|
||||
@@ -5,62 +5,61 @@ import numpy as np
|
||||
from tinygrad import Tensor, Device, dtypes, GlobalCounters, TinyJit
|
||||
from tinygrad.nn.state import get_parameters, load_state_dict, safe_load
|
||||
from tinygrad.helpers import getenv
|
||||
from extra.bench_log import BenchEvent, WallTimeEvent
|
||||
def tlog(x): print(f"{x:25s} @ {time.perf_counter()-start:5.2f}s")
|
||||
|
||||
def eval_resnet():
|
||||
with WallTimeEvent(BenchEvent.FULL):
|
||||
# Resnet50-v1.5
|
||||
from extra.models.resnet import ResNet50
|
||||
tlog("imports")
|
||||
GPUS = [f'{Device.DEFAULT}:{i}' for i in range(getenv("GPUS", 6))]
|
||||
for x in GPUS: Device[x]
|
||||
tlog("got devices") # NOTE: this is faster with rocm-smi running
|
||||
Tensor.no_grad = True
|
||||
# Resnet50-v1.5
|
||||
from extra.models.resnet import ResNet50
|
||||
tlog("imports")
|
||||
GPUS = [f'{Device.DEFAULT}:{i}' for i in range(getenv("GPUS", 6))]
|
||||
for x in GPUS: Device[x]
|
||||
tlog("got devices") # NOTE: this is faster with rocm-smi running
|
||||
|
||||
class ResnetRunner:
|
||||
def __init__(self, device=None):
|
||||
self.mdl = ResNet50()
|
||||
for x in get_parameters(self.mdl) if device else []: x.to_(device)
|
||||
if (fn:=getenv("RESNET_MODEL", "")): load_state_dict(self.mdl, safe_load(fn))
|
||||
else: self.mdl.load_from_pretrained()
|
||||
self.input_mean = Tensor([0.485, 0.456, 0.406], device=device).reshape(1, -1, 1, 1)
|
||||
self.input_std = Tensor([0.229, 0.224, 0.225], device=device).reshape(1, -1, 1, 1)
|
||||
def __call__(self, x:Tensor) -> Tensor:
|
||||
x = x.permute([0,3,1,2]).cast(dtypes.float32) / 255.0
|
||||
x -= self.input_mean
|
||||
x /= self.input_std
|
||||
return self.mdl(x).log_softmax().argmax(axis=1).realize()
|
||||
class ResnetRunner:
|
||||
def __init__(self, device=None):
|
||||
self.mdl = ResNet50()
|
||||
for x in get_parameters(self.mdl) if device else []: x.to_(device)
|
||||
if (fn:=getenv("RESNET_MODEL", "")): load_state_dict(self.mdl, safe_load(fn))
|
||||
else: self.mdl.load_from_pretrained()
|
||||
self.input_mean = Tensor([0.485, 0.456, 0.406], device=device).reshape(1, -1, 1, 1)
|
||||
self.input_std = Tensor([0.229, 0.224, 0.225], device=device).reshape(1, -1, 1, 1)
|
||||
def __call__(self, x:Tensor) -> Tensor:
|
||||
x = x.permute([0,3,1,2]).cast(dtypes.float32) / 255.0
|
||||
x -= self.input_mean
|
||||
x /= self.input_std
|
||||
return self.mdl(x).log_softmax().argmax(axis=1).realize()
|
||||
|
||||
mdl = TinyJit(ResnetRunner(GPUS))
|
||||
tlog("loaded models")
|
||||
mdl = TinyJit(ResnetRunner(GPUS))
|
||||
tlog("loaded models")
|
||||
|
||||
# evaluation on the mlperf classes of the validation set from imagenet
|
||||
from examples.mlperf.dataloader import batch_load_resnet
|
||||
iterator = batch_load_resnet(getenv("BS", 128*6), val=getenv("VAL", 1), shuffle=False, pad_first_batch=True)
|
||||
def data_get():
|
||||
x,y,cookie = next(iterator)
|
||||
return x.shard(GPUS, axis=0).realize(), y, cookie
|
||||
n,d = 0,0
|
||||
proc = data_get()
|
||||
tlog("loaded initial data")
|
||||
st = time.perf_counter()
|
||||
while proc is not None:
|
||||
GlobalCounters.reset()
|
||||
proc = (mdl(proc[0]), proc[1], proc[2]) # this frees the images
|
||||
run = time.perf_counter()
|
||||
# load the next data here
|
||||
try: next_proc = data_get()
|
||||
except StopIteration: next_proc = None
|
||||
nd = time.perf_counter()
|
||||
y = np.array(proc[1])
|
||||
proc = (proc[0].numpy() == y) & (y != -1) # this realizes the models and frees the cookies
|
||||
n += proc.sum()
|
||||
d += (y != -1).sum()
|
||||
et = time.perf_counter()
|
||||
tlog(f"****** {n:5d}/{d:5d} {n*100.0/d:.2f}% -- {(run-st)*1000:7.2f} ms to enqueue, {(et-run)*1000:7.2f} ms to realize ({(nd-run)*1000:7.2f} ms fetching). {(len(proc))/(et-st):8.2f} examples/sec. {GlobalCounters.global_ops*1e-12/(et-st):5.2f} TFLOPS")
|
||||
st = et
|
||||
proc, next_proc = next_proc, None
|
||||
tlog("done")
|
||||
# evaluation on the mlperf classes of the validation set from imagenet
|
||||
from examples.mlperf.dataloader import batch_load_resnet
|
||||
iterator = batch_load_resnet(getenv("BS", 128*6), val=getenv("VAL", 1), shuffle=False, pad_first_batch=True)
|
||||
def data_get():
|
||||
x,y,cookie = next(iterator)
|
||||
return x.shard(GPUS, axis=0).realize(), y, cookie
|
||||
n,d = 0,0
|
||||
proc = data_get()
|
||||
tlog("loaded initial data")
|
||||
st = time.perf_counter()
|
||||
while proc is not None:
|
||||
GlobalCounters.reset()
|
||||
proc = (mdl(proc[0]), proc[1], proc[2]) # this frees the images
|
||||
run = time.perf_counter()
|
||||
# load the next data here
|
||||
try: next_proc = data_get()
|
||||
except StopIteration: next_proc = None
|
||||
nd = time.perf_counter()
|
||||
y = np.array(proc[1])
|
||||
proc = (proc[0].numpy() == y) & (y != -1) # this realizes the models and frees the cookies
|
||||
n += proc.sum()
|
||||
d += (y != -1).sum()
|
||||
et = time.perf_counter()
|
||||
tlog(f"****** {n:5d}/{d:5d} {n*100.0/d:.2f}% -- {(run-st)*1000:7.2f} ms to enqueue, {(et-run)*1000:7.2f} ms to realize ({(nd-run)*1000:7.2f} ms fetching). {(len(proc))/(et-st):8.2f} examples/sec. {GlobalCounters.global_ops*1e-12/(et-st):5.2f} TFLOPS")
|
||||
st = et
|
||||
proc, next_proc = next_proc, None
|
||||
tlog("done")
|
||||
|
||||
def eval_unet3d():
|
||||
# UNet3D
|
||||
@@ -82,43 +81,47 @@ def eval_unet3d():
|
||||
|
||||
def eval_retinanet():
|
||||
# RetinaNet with ResNeXt50_32X4D
|
||||
from examples.mlperf.dataloader import batch_load_retinanet
|
||||
from extra.datasets.openimages import normalize, download_dataset, BASEDIR
|
||||
from extra.models.resnet import ResNeXt50_32X4D
|
||||
from extra.models.retinanet import RetinaNet
|
||||
mdl = RetinaNet(ResNeXt50_32X4D())
|
||||
mdl.load_from_pretrained()
|
||||
|
||||
input_mean = Tensor([0.485, 0.456, 0.406]).reshape(1, -1, 1, 1)
|
||||
input_std = Tensor([0.229, 0.224, 0.225]).reshape(1, -1, 1, 1)
|
||||
def input_fixup(x):
|
||||
x = x.permute([0,3,1,2]) / 255.0
|
||||
x -= input_mean
|
||||
x /= input_std
|
||||
return x
|
||||
|
||||
from extra.datasets.openimages import download_dataset, iterate, BASEDIR
|
||||
from pycocotools.coco import COCO
|
||||
from pycocotools.cocoeval import COCOeval
|
||||
from contextlib import redirect_stdout
|
||||
tlog("imports")
|
||||
|
||||
mdl = RetinaNet(ResNeXt50_32X4D())
|
||||
mdl.load_from_pretrained()
|
||||
tlog("loaded models")
|
||||
|
||||
coco = COCO(download_dataset(base_dir:=getenv("BASEDIR", BASEDIR), 'validation'))
|
||||
coco = COCO(download_dataset(base_dir:=getenv("BASE_DIR", BASEDIR), 'validation'))
|
||||
coco_eval = COCOeval(coco, iouType="bbox")
|
||||
coco_evalimgs, evaluated_imgs, ncats, narea = [], [], len(coco_eval.params.catIds), len(coco_eval.params.areaRng)
|
||||
tlog("loaded dataset")
|
||||
|
||||
iterator = batch_load_retinanet(coco, True, Path(base_dir), getenv("BS", 8), shuffle=False)
|
||||
def data_get():
|
||||
x, img_ids, img_sizes, cookie = next(iterator)
|
||||
return x.to(Device.DEFAULT).realize(), img_ids, img_sizes, cookie
|
||||
n = 0
|
||||
proc = data_get()
|
||||
tlog("loaded initial data")
|
||||
from tinygrad.engine.jit import TinyJit
|
||||
mdlrun = TinyJit(lambda x: mdl(input_fixup(x)).realize())
|
||||
|
||||
n, bs = 0, 8
|
||||
st = time.perf_counter()
|
||||
while proc is not None:
|
||||
GlobalCounters.reset()
|
||||
proc = (mdl(normalize(proc[0])), proc[1], proc[2], proc[3])
|
||||
run = time.perf_counter()
|
||||
# load the next data here
|
||||
try: next_proc = data_get()
|
||||
except StopIteration: next_proc = None
|
||||
nd = time.perf_counter()
|
||||
predictions, img_ids = mdl.postprocess_detections(proc[0].numpy(), orig_image_sizes=proc[2]), proc[1]
|
||||
pd = time.perf_counter()
|
||||
coco_results = [{"image_id": img_ids[i], "category_id": label, "bbox": box.tolist(), "score": score}
|
||||
for x, targets in iterate(coco, base_dir, bs):
|
||||
dat = Tensor(x.astype(np.float32))
|
||||
mt = time.perf_counter()
|
||||
if dat.shape[0] == bs:
|
||||
outs = mdlrun(dat).numpy()
|
||||
else:
|
||||
mdlrun._jit_cache = []
|
||||
outs = mdl(input_fixup(dat)).numpy()
|
||||
et = time.perf_counter()
|
||||
predictions = mdl.postprocess_detections(outs, input_size=dat.shape[1:3], orig_image_sizes=[t["image_size"] for t in targets])
|
||||
ext = time.perf_counter()
|
||||
n += len(targets)
|
||||
print(f"[{n}/{len(coco.imgs)}] == {(mt-st)*1000:.2f} ms loading data, {(et-mt)*1000:.2f} ms to run model, {(ext-et)*1000:.2f} ms for postprocessing")
|
||||
img_ids = [t["image_id"] for t in targets]
|
||||
coco_results = [{"image_id": targets[i]["image_id"], "category_id": label, "bbox": box.tolist(), "score": score}
|
||||
for i, prediction in enumerate(predictions) for box, score, label in zip(*prediction.values())]
|
||||
with redirect_stdout(None):
|
||||
coco_eval.cocoDt = coco.loadRes(coco_results)
|
||||
@@ -126,18 +129,13 @@ def eval_retinanet():
|
||||
coco_eval.evaluate()
|
||||
evaluated_imgs.extend(img_ids)
|
||||
coco_evalimgs.append(np.array(coco_eval.evalImgs).reshape(ncats, narea, len(img_ids)))
|
||||
n += len(proc[0])
|
||||
et = time.perf_counter()
|
||||
tlog(f"****** {(run-st)*1000:7.2f} ms to enqueue, {(et-run)*1000:7.2f} ms to realize ({(nd-run)*1000:7.2f} ms fetching, {(pd-run)*1000:4.2f} ms postprocess_detections). {(len(proc))/(et-st):8.2f} examples/sec. {GlobalCounters.global_ops*1e-12/(et-st):5.2f} TFLOPS")
|
||||
st = et
|
||||
proc, next_proc = next_proc, None
|
||||
st = time.perf_counter()
|
||||
|
||||
coco_eval.params.imgIds = evaluated_imgs
|
||||
coco_eval._paramsEval.imgIds = evaluated_imgs
|
||||
coco_eval.evalImgs = list(np.concatenate(coco_evalimgs, -1).flatten())
|
||||
coco_eval.accumulate()
|
||||
coco_eval.summarize()
|
||||
tlog("done")
|
||||
|
||||
def eval_rnnt():
|
||||
# RNN-T
|
||||
@@ -244,6 +242,7 @@ def eval_mrcnn():
|
||||
if __name__ == "__main__":
|
||||
# inference only
|
||||
Tensor.training = False
|
||||
Tensor.no_grad = True
|
||||
|
||||
models = getenv("MODEL", "resnet,retinanet,unet3d,rnnt,bert,mrcnn").split(",")
|
||||
for m in models:
|
||||
|
||||
@@ -60,6 +60,7 @@ def spec_mrcnn():
|
||||
if __name__ == "__main__":
|
||||
# inference only for now
|
||||
Tensor.training = False
|
||||
Tensor.no_grad = True
|
||||
|
||||
for m in getenv("MODEL", "resnet,retinanet,unet3d,rnnt,bert,mrcnn").split(","):
|
||||
nm = f"spec_{m}"
|
||||
|
||||
+129
-580
@@ -1,17 +1,15 @@
|
||||
import os, time, math, functools, random, contextlib
|
||||
import os, time, math, functools
|
||||
from pathlib import Path
|
||||
from tqdm import tqdm
|
||||
import multiprocessing
|
||||
|
||||
from tinygrad import Device, GlobalCounters, Tensor, TinyJit, dtypes
|
||||
from tinygrad.helpers import getenv, BEAM, WINO, round_up, diskcache_clear, FUSE_CONV_BW, Profiling
|
||||
from tinygrad.helpers import getenv, BEAM, WINO, round_up, diskcache_clear, FUSE_CONV_BW
|
||||
from tinygrad.nn.state import get_parameters, get_state_dict, safe_load, safe_save
|
||||
from tinygrad.nn.optim import LAMB, LARS, SGD, OptimizerGroup, Adam, AdamW
|
||||
from tinygrad.nn.optim import LAMB, LARS, SGD, OptimizerGroup
|
||||
|
||||
from extra.lr_scheduler import LRSchedulerGroup
|
||||
from examples.mlperf.helpers import get_training_state, load_training_state
|
||||
from extra.bench_log import BenchEvent, WallTimeEvent
|
||||
# TODO: fix benchmark logging and use tinygrad tqdm
|
||||
from tqdm import tqdm
|
||||
|
||||
def train_resnet():
|
||||
from extra.models import resnet
|
||||
@@ -80,7 +78,7 @@ def train_resnet():
|
||||
lr_warmup_epochs = config["lr_warmup_epochs"] = getenv("WARMUP_EPOCHS", 2)
|
||||
decay = config["decay"] = getenv("DECAY", 2e-4)
|
||||
|
||||
loss_scaler = config["LOSS_SCALER"] = getenv("LOSS_SCALER", 256.0 if dtypes.default_float == dtypes.float16 else 1.0)
|
||||
loss_scaler = config["LOSS_SCALER"] = getenv("LOSS_SCALER", 128.0 if dtypes.default_float == dtypes.float16 else 1.0)
|
||||
|
||||
target, achieved = getenv("TARGET", 0.759), False
|
||||
eval_start_epoch = getenv("EVAL_START_EPOCH", 0)
|
||||
@@ -206,25 +204,24 @@ def train_resnet():
|
||||
st = time.perf_counter()
|
||||
while proc is not None:
|
||||
GlobalCounters.reset()
|
||||
with WallTimeEvent(BenchEvent.STEP):
|
||||
(loss, top_1), y, proc = train_step(proc[0], proc[1]), proc[2], proc[3]
|
||||
(loss, top_1), y, proc = train_step(proc[0], proc[1]), proc[2], proc[3]
|
||||
|
||||
pt = time.perf_counter()
|
||||
pt = time.perf_counter()
|
||||
|
||||
if len(prev_cookies) == getenv("STORE_COOKIES", 1): prev_cookies = [] # free previous cookies after gpu work has been enqueued
|
||||
try:
|
||||
if INITMLPERF:
|
||||
next_proc = fake_data_get(BS)
|
||||
else:
|
||||
next_proc = data_get(it)
|
||||
except StopIteration:
|
||||
next_proc = None
|
||||
if len(prev_cookies) == getenv("STORE_COOKIES", 1): prev_cookies = [] # free previous cookies after gpu work has been enqueued
|
||||
try:
|
||||
if INITMLPERF:
|
||||
next_proc = fake_data_get(BS)
|
||||
else:
|
||||
next_proc = data_get(it)
|
||||
except StopIteration:
|
||||
next_proc = None
|
||||
|
||||
dt = time.perf_counter()
|
||||
dt = time.perf_counter()
|
||||
|
||||
device_str = loss.device if isinstance(loss.device, str) else f"{loss.device[0]} * {len(loss.device)}"
|
||||
loss, top_1 = loss.numpy().item(), top_1.numpy().item()
|
||||
top_1_acc = top_1 / sum(yi != -1 for yi in y)
|
||||
device_str = loss.device if isinstance(loss.device, str) else f"{loss.device[0]} * {len(loss.device)}"
|
||||
loss, top_1 = loss.numpy().item(), top_1.numpy().item()
|
||||
top_1_acc = top_1 / sum(yi != -1 for yi in y)
|
||||
|
||||
cl = time.perf_counter()
|
||||
if BENCHMARK:
|
||||
@@ -275,7 +272,7 @@ def train_resnet():
|
||||
else:
|
||||
it = iter(tqdm(batch_load_resnet(batch_size=EVAL_BS, val=True, shuffle=False, pad_first_batch=True), total=steps_in_val_epoch))
|
||||
i, proc = 0, data_get(it)
|
||||
|
||||
|
||||
prev_cookies = []
|
||||
while proc is not None:
|
||||
GlobalCounters.reset()
|
||||
@@ -345,349 +342,8 @@ def train_resnet():
|
||||
safe_save(get_training_state(model, optimizer_group, scheduler_group), fn)
|
||||
|
||||
def train_retinanet():
|
||||
from contextlib import redirect_stdout
|
||||
from examples.mlperf.dataloader import batch_load_retinanet
|
||||
from examples.mlperf.initializers import FrozenBatchNorm2dRetinaNet, Conv2dNormalRetinaNet, Conv2dKaimingUniformRetinaNet, Linear, Conv2dRetinaNet
|
||||
from extra.datasets.openimages import MLPERF_CLASSES, BASEDIR, download_dataset, normalize, get_dataset_count
|
||||
from extra.models import resnet, retinanet
|
||||
from pycocotools.coco import COCO
|
||||
from pycocotools.cocoeval import COCOeval
|
||||
from tinygrad.helpers import colored
|
||||
from typing import Iterator
|
||||
|
||||
import numpy as np
|
||||
|
||||
config, target_metric = {}, 0.34
|
||||
|
||||
config["SEED"] = SEED = getenv("SEED", random.SystemRandom().randint(0, 2**32 - 1))
|
||||
Tensor.manual_seed(SEED)
|
||||
|
||||
NUM_CLASSES = len(MLPERF_CLASSES)
|
||||
BASEDIR = getenv("BASEDIR", BASEDIR)
|
||||
BENCHMARK = getenv("BENCHMARK")
|
||||
INITMLPERF = getenv("INITMLPERF")
|
||||
RUNMLPERF = getenv("RUNMLPERF")
|
||||
|
||||
if INITMLPERF:
|
||||
diskcache_clear()
|
||||
|
||||
if getenv("LOGMLPERF"):
|
||||
from mlperf_logging import mllog
|
||||
import mlperf_logging.mllog.constants as mllog_constants
|
||||
|
||||
mllog.config(filename=f"result_retinanet_{SEED}.log")
|
||||
mllog.config(root_dir=Path(__file__).parents[3].as_posix())
|
||||
MLLOGGER = mllog.get_mllogger()
|
||||
MLLOGGER.logger.propagate = False
|
||||
|
||||
if INITMLPERF:
|
||||
assert BENCHMARK, "BENCHMARK must be set for INITMLPERF"
|
||||
MLLOGGER.event(key=mllog_constants.SUBMISSION_ORG, value="tinycorp")
|
||||
MLLOGGER.event(key=mllog_constants.SUBMISSION_PLATFORM, value=getenv("SUBMISSION_PLATFORM", "tinybox"))
|
||||
MLLOGGER.event(key=mllog_constants.SUBMISSION_DIVISION, value=mllog_constants.CLOSED)
|
||||
MLLOGGER.event(key=mllog_constants.SUBMISSION_STATUS, value=mllog_constants.ONPREM)
|
||||
|
||||
MLLOGGER.event(key=mllog_constants.SUBMISSION_BENCHMARK, value=mllog_constants.RETINANET)
|
||||
|
||||
MLLOGGER.event(key=mllog_constants.CACHE_CLEAR, value=True)
|
||||
MLLOGGER.start(key=mllog_constants.INIT_START)
|
||||
|
||||
if RUNMLPERF:
|
||||
MLLOGGER.start(key=mllog_constants.RUN_START)
|
||||
MLLOGGER.event(key=mllog_constants.SEED, value=SEED)
|
||||
else:
|
||||
MLLOGGER = None
|
||||
|
||||
config["gpus"] = GPUS = [f"{Device.DEFAULT}:{i}" for i in range(getenv("GPUS", 6))]
|
||||
|
||||
for x in GPUS: Device[x]
|
||||
print(f"training on {GPUS}")
|
||||
|
||||
def _freeze_backbone_layers(backbone:resnet.ResNet, trainable_layers:int):
|
||||
layers_to_train = ["layer4", "layer3", "layer2", "layer1", "conv1"][:trainable_layers]
|
||||
for k, v in get_state_dict(backbone).items():
|
||||
if all([not k.startswith(layer) for layer in layers_to_train]):
|
||||
v.requires_grad = False
|
||||
|
||||
def _data_get(it:Iterator[tuple[Tensor, ...]], val:bool=False):
|
||||
if val:
|
||||
x, img_ids, img_sizes, cookie = next(it)
|
||||
return x.shard(GPUS, axis=0), img_ids, img_sizes, cookie
|
||||
|
||||
x, y_boxes, y_labels, matches, anchors, cookie = next(it)
|
||||
return x.shard(GPUS, axis=0), y_boxes.shard(GPUS, axis=0), y_labels.shard(GPUS, axis=0), matches.shard(GPUS, axis=0), anchors.shard(GPUS, axis=0), cookie
|
||||
|
||||
def _fake_data_get(bs:int, val:bool=False):
|
||||
x = Tensor.empty(bs, 800, 800, 3, dtype=dtypes.uint8)
|
||||
if val:
|
||||
img_ids, img_sizes = [0] * bs, [(800, 800)] * bs
|
||||
return x.shard(GPUS, axis=0), img_ids, img_sizes, None
|
||||
|
||||
y_boxes = Tensor.empty(bs, 120087, 4, dtype=dtypes.float32)
|
||||
y_labels = Tensor.empty(bs, 120087, dtype=dtypes.int64)
|
||||
matches = Tensor.empty(bs, 120087, dtype=dtypes.int64)
|
||||
anchors = Tensor.empty(bs, 120087, 4, dtype=dtypes.float64)
|
||||
return x.shard(GPUS, axis=0), y_boxes.shard(GPUS, axis=0), y_labels.shard(GPUS, axis=0), matches.shard(GPUS, axis=0), anchors.shard(GPUS, axis=0), None
|
||||
|
||||
@TinyJit
|
||||
def _train_step(model, optim, loss_scaler, x, **kwargs):
|
||||
optim.zero_grad()
|
||||
|
||||
losses = model(normalize(x, GPUS), **kwargs)
|
||||
loss = sum(losses.values())
|
||||
|
||||
(loss * loss_scaler).backward()
|
||||
for t in optim.params: t.grad = t.grad / loss_scaler
|
||||
|
||||
optim.step()
|
||||
|
||||
return loss.realize(), losses
|
||||
|
||||
@TinyJit
|
||||
def _eval_step(model, x, **kwargs):
|
||||
out = model(normalize(x, GPUS), **kwargs)
|
||||
# reassemble on GPUS[0] before sending back to CPU for speed
|
||||
return out.to(GPUS[0]).realize()
|
||||
|
||||
# ** hyperparameters **
|
||||
config["BS"] = BS = getenv("BS", 16 * len(GPUS) if dtypes.default_float == dtypes.float16 else 12 * len(GPUS))
|
||||
config["EVAL_BS"] = EVAL_BS = getenv("EVAL_BS", BS)
|
||||
config["EPOCHS"] = EPOCHS = getenv("EPOCHS", 4)
|
||||
config["TRAIN_BEAM"] = TRAIN_BEAM = getenv("TRAIN_BEAM", BEAM.value)
|
||||
config["EVAL_BEAM"] = EVAL_BEAM = getenv("EVAL_BEAM", BEAM.value)
|
||||
config["LR"] = lr = getenv("LR", 9.5e-5 * (BS / 96))
|
||||
config["LOSS_SCALER"] = loss_scaler = getenv("LOSS_SCALER", 2**11 if dtypes.default_float == dtypes.float16 else 1.0)
|
||||
config["DEFAULT_FLOAT"] = dtypes.default_float.name
|
||||
config["EVAL_FREQ"] = eval_freq = getenv("EVAL_FREQ", 1)
|
||||
|
||||
# ** initialize wandb **
|
||||
if (WANDB:=getenv("WANDB")):
|
||||
import wandb
|
||||
wandb.init(config=config, project="MLPerf-RetinaNet")
|
||||
|
||||
# ** model initializers **
|
||||
resnet.BatchNorm = FrozenBatchNorm2dRetinaNet
|
||||
resnet.Linear = Linear
|
||||
resnet.Conv2d = Conv2dRetinaNet
|
||||
|
||||
retinanet.ConvHead = Conv2dNormalRetinaNet
|
||||
retinanet.ConvClassificationHeadLogits = functools.partial(Conv2dNormalRetinaNet, prior_prob=0.01)
|
||||
retinanet.ConvFPN = Conv2dKaimingUniformRetinaNet
|
||||
|
||||
# ** model setup **
|
||||
backbone = resnet.ResNeXt50_32X4D(num_classes=None)
|
||||
if RUNMLPERF:
|
||||
backbone.load_from_pretrained()
|
||||
_freeze_backbone_layers(backbone, 3)
|
||||
|
||||
model = retinanet.RetinaNet(backbone, num_classes=NUM_CLASSES)
|
||||
params = get_parameters(model)
|
||||
|
||||
if not RUNMLPERF:
|
||||
# for init, zero out all weights
|
||||
for p in params:
|
||||
p = p.assign(Tensor.zeros_like(p).contiguous()).realize()
|
||||
|
||||
if len(GPUS) > 1:
|
||||
for p in params: p.to_(GPUS)
|
||||
|
||||
step_times, start_epoch = [], 0
|
||||
|
||||
# ** optimizer **
|
||||
optim = Adam(params, lr=lr)
|
||||
|
||||
# ** dataset **
|
||||
config["STEPS_IN_TRAIN_EPOCH"] = steps_in_train_epoch = round_up(get_dataset_count((base_dir_path:=Path(BASEDIR)), False), BS) // BS
|
||||
config["STEPS_IN_VAL_EPOCH"] = steps_in_val_epoch = (round_up(get_dataset_count(base_dir_path, True), EVAL_BS) // EVAL_BS)
|
||||
|
||||
# log mlperf hparams
|
||||
if MLLOGGER:
|
||||
if RUNMLPERF:
|
||||
MLLOGGER.event(key=mllog_constants.GLOBAL_BATCH_SIZE, value=config["BS"])
|
||||
MLLOGGER.event(key=mllog_constants.TRAIN_SAMPLES, value=config["STEPS_IN_TRAIN_EPOCH"])
|
||||
MLLOGGER.event(key=mllog_constants.EVAL_SAMPLES, value=config["STEPS_IN_VAL_EPOCH"])
|
||||
MLLOGGER.event(key=mllog_constants.EPOCH_COUNT, value=config["EPOCHS"])
|
||||
MLLOGGER.event(key=mllog_constants.FIRST_EPOCH_NUM, value=start_epoch)
|
||||
|
||||
MLLOGGER.event(key=mllog_constants.OPT_NAME, value=mllog_constants.ADAM)
|
||||
MLLOGGER.event(key=mllog_constants.OPT_BASE_LR, value=config["LR"])
|
||||
MLLOGGER.event(key=mllog_constants.OPT_WEIGHT_DECAY, value=0)
|
||||
MLLOGGER.event(key=mllog_constants.OPT_LR_WARMUP_EPOCHS, value=0)
|
||||
MLLOGGER.event(key=mllog_constants.OPT_LR_WARMUP_FACTOR, value=0)
|
||||
MLLOGGER.event(key=mllog_constants.GRADIENT_ACCUMULATION_STEPS, value=1)
|
||||
|
||||
if RUNMLPERF:
|
||||
train_dataset = COCO(download_dataset(BASEDIR, "train"))
|
||||
val_dataset = COCO(download_dataset(BASEDIR, "validation"))
|
||||
coco_val = COCOeval(cocoGt=val_dataset, iouType="bbox")
|
||||
|
||||
print(f"training with batch size {BS} for {EPOCHS} epochs")
|
||||
|
||||
for e in range(start_epoch, EPOCHS):
|
||||
# ** training loop **
|
||||
if MLLOGGER and RUNMLPERF:
|
||||
MLLOGGER.start(key=mllog_constants.EPOCH_START, value=e + 1, metadata={"epoch_num": e + 1})
|
||||
|
||||
BEAM.value = TRAIN_BEAM
|
||||
|
||||
if not RUNMLPERF:
|
||||
i, proc = 0, _fake_data_get(BS)
|
||||
else:
|
||||
train_dataloader = batch_load_retinanet(train_dataset, False, base_dir_path, batch_size=BS, seed=SEED)
|
||||
it = iter(tqdm(train_dataloader, total=steps_in_train_epoch, desc=f"epoch {e + 1}", disable=BENCHMARK))
|
||||
i, proc = 0, _data_get(it)
|
||||
|
||||
prev_cookies = []
|
||||
st = time.perf_counter()
|
||||
|
||||
while proc is not None:
|
||||
GlobalCounters.reset()
|
||||
|
||||
x, y_bboxes, y_labels, matches, anchors, proc = proc
|
||||
loss, losses = _train_step(model, optim, loss_scaler, x, labels=y_labels, matches=matches, anchors=anchors, bboxes=y_bboxes)
|
||||
|
||||
pt = time.perf_counter()
|
||||
|
||||
if len(prev_cookies) == getenv("STORE_COOKIES", 1): prev_cookies = [] # free previous cookies after gpu work has been enqueued
|
||||
try:
|
||||
if not RUNMLPERF:
|
||||
next_proc = _fake_data_get(BS)
|
||||
else:
|
||||
next_proc = _data_get(it)
|
||||
except StopIteration:
|
||||
next_proc = None
|
||||
|
||||
dt = time.perf_counter()
|
||||
|
||||
device_str = loss.device if isinstance(loss.device, str) else f"{loss.device[0]} * {len(loss.device)}"
|
||||
loss = loss.item()
|
||||
|
||||
cl = time.perf_counter()
|
||||
if BENCHMARK: step_times.append(cl - st)
|
||||
|
||||
if not math.isfinite(loss):
|
||||
print("loss is nan")
|
||||
return
|
||||
|
||||
tqdm.write(
|
||||
f"{i:5} {((cl - st)) * 1000.0:7.2f} ms run, {(pt - st) * 1000.0:7.2f} ms python, {(dt - pt) * 1000.0:6.2f} ms fetch data, "
|
||||
f"{(cl - dt) * 1000.0:7.2f} ms {device_str}, {loss:5.2f} loss, {losses['classification_loss'].item():5.4f} classification loss, {losses['regression_loss'].item():5.4f} regression loss, "
|
||||
f"{optim.lr.numpy()[0]:.6f} LR, {GlobalCounters.mem_used / 1e9:.2f} GB used, {GlobalCounters.global_ops * 1e-9 / (cl - st):9.2f} GFLOPS"
|
||||
)
|
||||
|
||||
if WANDB:
|
||||
wandb.log({"lr": optim.lr.numpy(), "train/loss": loss, "train/classification_loss": losses["classification_loss"].item(), "train/regression_loss": losses["regression_loss"].item(),
|
||||
"train/step_time": cl - st, "train/python_time": pt - st, "train/data_time": dt - pt, "train/cl_time": cl - dt,
|
||||
"train/GFLOPS": GlobalCounters.global_ops * 1e-9 / (cl - st), "epoch": e + (i + 1) / steps_in_train_epoch})
|
||||
|
||||
st = cl
|
||||
prev_cookies.append(proc)
|
||||
proc, next_proc = next_proc, None # return old cookie
|
||||
i += 1
|
||||
|
||||
if i == BENCHMARK:
|
||||
assert not math.isnan(loss)
|
||||
median_step_time = sorted(step_times)[(BENCHMARK + 1) // 2] # in seconds
|
||||
estimated_total_minutes = int(median_step_time * steps_in_train_epoch * EPOCHS / 60)
|
||||
print(f"Estimated training time: {estimated_total_minutes // 60}h{estimated_total_minutes % 60}m")
|
||||
print(f"epoch global_ops: {steps_in_train_epoch * GlobalCounters.global_ops:_}, "
|
||||
f"epoch global_mem: {steps_in_train_epoch * GlobalCounters.global_mem:_}")
|
||||
# if we are doing beam search, run the first eval too
|
||||
if (TRAIN_BEAM or EVAL_BEAM) and e == start_epoch: break
|
||||
return
|
||||
|
||||
if MLLOGGER and RUNMLPERF:
|
||||
MLLOGGER.event(key=mllog_constants.EPOCH_STOP, value=e + 1, metadata={"epoch_num": e + 1})
|
||||
|
||||
# ** eval loop **
|
||||
if (e + 1) % eval_freq == 0:
|
||||
if MLLOGGER and RUNMLPERF:
|
||||
MLLOGGER.start(key=mllog_constants.EVAL_START, value=e + 1, metadata={"epoch_num": e + 1})
|
||||
|
||||
BEAM.value = EVAL_BEAM
|
||||
|
||||
if getenv("RESET_STEP", 1): _train_step.reset()
|
||||
|
||||
with Tensor.train(mode=False):
|
||||
if not RUNMLPERF:
|
||||
i, proc = 0, _fake_data_get(EVAL_BS, val=(val:=True))
|
||||
else:
|
||||
val_dataloader = batch_load_retinanet(val_dataset, (val:=True), Path(BASEDIR), batch_size=EVAL_BS, shuffle=False, seed=SEED)
|
||||
it = iter(tqdm(val_dataloader, total=steps_in_val_epoch))
|
||||
i, proc = 0, _data_get(it, val=val)
|
||||
val_img_ids, val_imgs, ncats, narea = [], [], len(coco_val.params.catIds), len(coco_val.params.areaRng)
|
||||
|
||||
eval_times, prev_cookies = [], []
|
||||
|
||||
while proc is not None:
|
||||
GlobalCounters.reset()
|
||||
st = time.time()
|
||||
|
||||
out, img_ids, img_sizes, proc = _eval_step(model, (x:=proc[0])).numpy(), proc[1], proc[2], proc[3]
|
||||
|
||||
if RUNMLPERF:
|
||||
out = model.postprocess_detections(out, input_size=x.shape[1:3], orig_image_sizes=img_sizes)
|
||||
coco_results = [{"image_id": img_ids[i], "category_id": label, "bbox": box.tolist(), "score": score}
|
||||
for i, prediction in enumerate(out) for box, score, label in zip(*prediction.values())]
|
||||
|
||||
with redirect_stdout(None):
|
||||
coco_val.cocoDt = val_dataset.loadRes(coco_results)
|
||||
coco_val.params.imgIds = img_ids
|
||||
coco_val.evaluate()
|
||||
|
||||
val_img_ids.extend(img_ids)
|
||||
val_imgs.append(np.array(coco_val.evalImgs).reshape(ncats, narea, len(img_ids)))
|
||||
|
||||
if len(prev_cookies) == getenv("STORE_COOKIES", 1): prev_cookies = [] # free previous cookies after gpu work has been enqueued
|
||||
try:
|
||||
if not RUNMLPERF:
|
||||
next_proc = _fake_data_get(EVAL_BS, val=val)
|
||||
else:
|
||||
next_proc = _data_get(it, val=val)
|
||||
except StopIteration:
|
||||
next_proc = None
|
||||
|
||||
prev_cookies.append(proc)
|
||||
proc, next_proc = next_proc, None
|
||||
i += 1
|
||||
|
||||
et = time.time()
|
||||
eval_times.append(et - st)
|
||||
|
||||
if i == BENCHMARK:
|
||||
# assume INITMLPERF has BENCHMARK set
|
||||
if MLLOGGER and INITMLPERF:
|
||||
MLLOGGER.event(key=mllog_constants.INIT_STOP)
|
||||
return
|
||||
|
||||
if getenv("RESET_STEP", 1): _eval_step.reset()
|
||||
total_fw_time = sum(eval_times) / len(eval_times)
|
||||
|
||||
if RUNMLPERF:
|
||||
coco_val.params.imgIds = val_img_ids
|
||||
coco_val._paramsEval.imgIds = val_img_ids
|
||||
coco_val.evalImgs = list(np.concatenate(val_imgs, -1).flatten())
|
||||
coco_val.accumulate()
|
||||
coco_val.summarize()
|
||||
|
||||
val_metric = coco_val.stats[0]
|
||||
|
||||
tqdm.write(f"eval time: {total_fw_time:.2f}, eval metric: {val_metric:.4f}")
|
||||
|
||||
if WANDB:
|
||||
wandb.log({"eval/forward_time": total_fw_time, "eval/metric": val_metric, "epoch": e + 1})
|
||||
|
||||
if MLLOGGER:
|
||||
MLLOGGER.event(key=mllog_constants.EVAL_ACCURACY, value=val_metric, metadata={"epoch_num": e + 1}, clear_line=True)
|
||||
MLLOGGER.end(key=mllog_constants.EVAL_STOP, value=e + 1, metadata={"epoch_num": e + 1})
|
||||
|
||||
if val_metric >= target_metric:
|
||||
print(colored(f"target metric reached: {val_metric:.2f}/{target_metric:.2f}", color="green"))
|
||||
|
||||
if MLLOGGER:
|
||||
MLLOGGER.end(key=mllog_constants.RUN_STOP, metadata={"status": mllog_constants.SUCCESS})
|
||||
|
||||
break
|
||||
# TODO: Retinanet
|
||||
pass
|
||||
|
||||
def train_unet3d():
|
||||
"""
|
||||
@@ -789,15 +445,16 @@ def train_unet3d():
|
||||
loss.backward()
|
||||
optim.step()
|
||||
return loss.realize()
|
||||
|
||||
|
||||
@Tensor.train(mode=False)
|
||||
@Tensor.test()
|
||||
def eval_step(model, x, y):
|
||||
y_hat, y = sliding_window_inference(model, x, y, gpus=GPUS)
|
||||
y_hat, y = Tensor(y_hat), Tensor(y, requires_grad=False)
|
||||
loss = dice_ce_loss(y_hat, y)
|
||||
score = dice_score(y_hat, y)
|
||||
return loss.realize(), score.realize()
|
||||
|
||||
|
||||
if WANDB: wandb.init(config=config, project=PROJ_NAME)
|
||||
|
||||
step_times, start_epoch = [], 1
|
||||
@@ -806,7 +463,7 @@ def train_unet3d():
|
||||
next_eval_at = start_eval_at
|
||||
|
||||
print(f"Training on {GPUS}")
|
||||
|
||||
|
||||
if BENCHMARK: print("Benchmarking UNet3D")
|
||||
else: print(f"Start evaluation at epoch {start_eval_at} and every {evaluate_every} epoch(s) afterwards")
|
||||
|
||||
@@ -893,7 +550,7 @@ def train_unet3d():
|
||||
|
||||
if mean_dice >= TARGET_METRIC:
|
||||
is_successful = True
|
||||
save_checkpoint(get_state_dict(model), "./ckpts/unet3d.safe")
|
||||
save_checkpoint(get_state_dict(model), f"./ckpts/unet3d.safe")
|
||||
elif mean_dice < 1e-6:
|
||||
print("Model diverging. Aborting.")
|
||||
diverged = True
|
||||
@@ -914,57 +571,39 @@ def train_rnnt():
|
||||
pass
|
||||
|
||||
@TinyJit
|
||||
def train_step_bert(model, optimizer, scheduler, loss_scaler:float, GPUS, grad_acc:int, **kwargs):
|
||||
def train_step_bert(model, optimizer, scheduler, loss_scaler:float, input_ids:Tensor, segment_ids:Tensor, attention_mask:Tensor, masked_positions:Tensor, masked_lm_ids:Tensor, masked_lm_weights:Tensor, next_sentence_labels:Tensor):
|
||||
optimizer.zero_grad()
|
||||
|
||||
for i in range(grad_acc):
|
||||
input_ids, segment_ids = kwargs[f"input_ids{i}"], kwargs[f"segment_ids{i}"]
|
||||
# NOTE: these two have different names
|
||||
attention_mask, masked_positions = kwargs[f"input_mask{i}"], kwargs[f"masked_lm_positions{i}"]
|
||||
masked_lm_ids, masked_lm_weights, next_sentence_labels = kwargs[f"masked_lm_ids{i}"], kwargs[f"masked_lm_weights{i}"], kwargs[f"next_sentence_labels{i}"]
|
||||
lm_logits, seq_relationship_logits = model(input_ids, attention_mask, masked_positions, segment_ids)
|
||||
loss = model.loss(lm_logits, seq_relationship_logits, masked_lm_ids, masked_lm_weights, next_sentence_labels)
|
||||
(loss * loss_scaler).backward()
|
||||
|
||||
for t in [input_ids, segment_ids, attention_mask, masked_positions, masked_lm_ids, masked_lm_weights, next_sentence_labels]:
|
||||
if len(GPUS) > 1: t.shard_(GPUS, axis=0)
|
||||
else: t.to_(GPUS[0])
|
||||
|
||||
lm_logits, seq_relationship_logits = model(input_ids, attention_mask, masked_positions, segment_ids)
|
||||
loss = model.loss(lm_logits, seq_relationship_logits, masked_lm_ids, masked_lm_weights, next_sentence_labels)
|
||||
(loss * loss_scaler).backward()
|
||||
# TODO: OOM without this realize with large grad_acc
|
||||
Tensor.realize(*[p.grad for p in optimizer.params])
|
||||
|
||||
global_norm = Tensor(0.0, dtype=dtypes.float32, device=optimizer[0].device)
|
||||
for p in optimizer.params:
|
||||
global_norm = Tensor([0.0], dtype=dtypes.float32, device=optimizer[0].device).realize()
|
||||
for p in optimizer.params:
|
||||
p.grad = p.grad / loss_scaler
|
||||
global_norm += p.grad.float().square().sum()
|
||||
global_norm = global_norm.sqrt().contiguous()
|
||||
for p in optimizer.params:
|
||||
p.grad = (global_norm > 1.0).where((p.grad/global_norm).cast(p.grad.dtype), p.grad)
|
||||
global_norm = global_norm.sqrt()
|
||||
for p in optimizer.params: p.grad = (p.grad / Tensor.where(global_norm > 1.0, global_norm, 1.0)).cast(p.grad.dtype)
|
||||
|
||||
optimizer.step()
|
||||
scheduler.step()
|
||||
# TODO: no to("CPU") here because it blocks and messes the python time
|
||||
Tensor.realize(loss, global_norm, optimizer.optimizers[0].lr)
|
||||
return loss, global_norm, optimizer.optimizers[0].lr
|
||||
return loss.realize()
|
||||
|
||||
@TinyJit
|
||||
def eval_step_bert(model, input_ids:Tensor, segment_ids:Tensor, attention_mask:Tensor, masked_positions:Tensor, masked_lm_ids:Tensor,
|
||||
masked_lm_weights:Tensor, next_sentence_labels:Tensor, GPUS):
|
||||
for t in [input_ids, segment_ids, attention_mask, masked_positions, masked_lm_ids, masked_lm_weights, next_sentence_labels]:
|
||||
if len(GPUS) > 1: t.shard_(GPUS, axis=0)
|
||||
else: t.to_(GPUS[0])
|
||||
def eval_step_bert(model, input_ids:Tensor, segment_ids:Tensor, attention_mask:Tensor, masked_positions:Tensor, masked_lm_ids:Tensor, masked_lm_weights:Tensor, next_sentence_labels:Tensor):
|
||||
lm_logits, seq_relationship_logits = model(input_ids, attention_mask, masked_positions, segment_ids)
|
||||
masked_lm_accuracy, seq_relationship_accuracy, masked_lm_loss, next_sentence_loss = \
|
||||
model.accuracy(lm_logits, seq_relationship_logits, masked_lm_ids, masked_lm_weights, next_sentence_labels)
|
||||
for t in [masked_lm_accuracy, seq_relationship_accuracy, masked_lm_loss, next_sentence_loss]:
|
||||
t.to_("CPU")
|
||||
Tensor.realize(masked_lm_accuracy, seq_relationship_accuracy, masked_lm_loss, next_sentence_loss)
|
||||
return masked_lm_accuracy, seq_relationship_accuracy, masked_lm_loss, next_sentence_loss
|
||||
masked_lm_accuracy, seq_relationship_accuracy, masked_lm_loss, next_sentence_loss = model.accuracy(lm_logits, seq_relationship_logits, masked_lm_ids, masked_lm_weights, next_sentence_labels)
|
||||
return {
|
||||
"masked_lm_accuracy": masked_lm_accuracy.realize(),
|
||||
"next_sentence_accuracy": seq_relationship_accuracy.realize(),
|
||||
"masked_lm_loss": masked_lm_loss.realize(),
|
||||
"next_sentence_loss": next_sentence_loss.realize()
|
||||
}
|
||||
|
||||
def train_bert():
|
||||
# NOTE: pip install tensorflow, wandb required
|
||||
from examples.mlperf.dataloader import batch_load_train_bert, batch_load_val_bert
|
||||
from examples.mlperf.helpers import get_mlperf_bert_model, get_fake_data_bert
|
||||
from examples.mlperf.helpers import get_mlperf_bert_model, get_data_bert, get_fake_data_bert
|
||||
from examples.mlperf.lr_schedulers import PolynomialDecayWithWarmup
|
||||
|
||||
config = {}
|
||||
@@ -988,7 +627,7 @@ def train_bert():
|
||||
MLLOGGER.logger.propagate = False
|
||||
|
||||
if INITMLPERF:
|
||||
assert BENCHMARK, "BENCHMARK must be set for INITMLPERF"
|
||||
assert BENCHMARK, f"BENCHMARK must be set for INITMLPERF"
|
||||
MLLOGGER.event(key=mllog_constants.SUBMISSION_ORG, value="tinycorp")
|
||||
MLLOGGER.event(key=mllog_constants.SUBMISSION_PLATFORM, value=getenv("SUBMISSION_PLATFORM", "tinybox"))
|
||||
MLLOGGER.event(key=mllog_constants.SUBMISSION_DIVISION, value=mllog_constants.CLOSED)
|
||||
@@ -1002,30 +641,24 @@ def train_bert():
|
||||
|
||||
if RUNMLPERF:
|
||||
MLLOGGER.start(key=mllog_constants.RUN_START, value=None)
|
||||
MLLOGGER.event(key=mllog_constants.SEED, value=seed)
|
||||
else:
|
||||
MLLOGGER = None
|
||||
|
||||
# ** hyperparameters **
|
||||
BS = config["BS"] = getenv("BS", 11 * len(GPUS) if dtypes.default_float in (dtypes.float16, dtypes.bfloat16) else 8 * len(GPUS))
|
||||
grad_acc = config["GRADIENT_ACC_STEPS"] = getenv("GRADIENT_ACC_STEPS", 1)
|
||||
# TODO: mlperf logging
|
||||
GBS = config["GLOBAL_BATCH_SIZE"] = BS * grad_acc
|
||||
BS = config["GLOBAL_BATCH_SIZE"] = getenv("BS", 11 * len(GPUS) if dtypes.default_float in (dtypes.float16, dtypes.bfloat16) else 8 * len(GPUS))
|
||||
EVAL_BS = config["EVAL_BS"] = getenv("EVAL_BS", 1 * len(GPUS))
|
||||
max_lr = config["OPT_BASE_LEARNING_RATE"] = getenv("OPT_BASE_LEARNING_RATE", 0.000175 * math.sqrt(GBS/96))
|
||||
opt_lamb_beta_1 = config["OPT_LAMB_BETA_1"] = getenv("OPT_LAMB_BETA_1", 0.9)
|
||||
opt_lamb_beta_2 = config["OPT_LAMB_BETA_2"] = getenv("OPT_LAMB_BETA_2", 0.999)
|
||||
max_lr = config["OPT_BASE_LEARNING_RATE"] = getenv("OPT_BASE_LEARNING_RATE", 0.0001 * math.sqrt(BS/66))
|
||||
|
||||
train_steps = config["TRAIN_STEPS"] = getenv("TRAIN_STEPS", 3600000 // GBS)
|
||||
train_steps = config["TRAIN_STEPS"] = getenv("TRAIN_STEPS", 3630000 // BS)
|
||||
warmup_steps = config["NUM_WARMUP_STEPS"] = getenv("NUM_WARMUP_STEPS", 1)
|
||||
max_eval_steps = config["MAX_EVAL_STEPS"] = getenv("MAX_EVAL_STEPS", (10000 + EVAL_BS - 1) // EVAL_BS) # EVAL_BS * MAX_EVAL_STEPS >= 10000
|
||||
eval_step_freq = config["EVAL_STEP_FREQ"] = getenv("EVAL_STEP_FREQ", int((math.floor(0.05 * (230.23 * GBS + 3000000) / 25000) * 25000) / GBS)) # Round down
|
||||
eval_step_freq = config["EVAL_STEP_FREQ"] = getenv("EVAL_STEP_FREQ", int((math.floor(0.05 * (230.23 * BS + 3000000) / 25000) * 25000) / BS)) # Round down
|
||||
save_ckpt_freq = config["SAVE_CKPT_FREQ"] = getenv("SAVE_CKPT_FREQ", 1000)
|
||||
keep_ckpt_amount = config["KEEP_CKPT_AMOUNT"] = getenv("KEEP_CKPT_AMOUNT", 5)
|
||||
save_ckpt_dir = config["SAVE_CKPT_DIR"] = getenv("SAVE_CKPT_DIR", "./ckpts")
|
||||
init_ckpt = config["INIT_CKPT_DIR"] = getenv("INIT_CKPT_DIR", BASEDIR)
|
||||
|
||||
loss_scaler = config["LOSS_SCALER"] = getenv("LOSS_SCALER", 2.0**11 if dtypes.default_float == dtypes.float16 else 1.0)
|
||||
loss_scaler = config["LOSS_SCALER"] = getenv("LOSS_SCALER", 2.0**10 if dtypes.default_float == dtypes.float16 else 1.0)
|
||||
decay = config["DECAY"] = getenv("DECAY", 0.01)
|
||||
epsilon = config["EPSILON"] = getenv("EPSILON", 1e-6)
|
||||
poly_power = config["POLY_POWER"] = getenv("POLY_POWER", 1.0)
|
||||
@@ -1050,18 +683,11 @@ def train_bert():
|
||||
|
||||
# ** init model **
|
||||
|
||||
model = get_mlperf_bert_model()
|
||||
if RUNMLPERF:
|
||||
model.load_from_pretrained(init_ckpt)
|
||||
else:
|
||||
# for init, zero out all weights
|
||||
for p in get_parameters(model):
|
||||
p = p.assign(Tensor.zeros_like(p).contiguous()).realize()
|
||||
|
||||
model = get_mlperf_bert_model(init_ckpt if RUNMLPERF else None)
|
||||
|
||||
for _, x in get_state_dict(model).items():
|
||||
x.realize().to_(GPUS)
|
||||
parameters = get_parameters(model)
|
||||
if len(GPUS) > 1:
|
||||
for p in parameters:
|
||||
p.to_(GPUS)
|
||||
|
||||
# ** Log run config **
|
||||
for key, value in config.items(): print(f'HParam: "{key}": {value}')
|
||||
@@ -1069,15 +695,15 @@ def train_bert():
|
||||
# ** Optimizer **
|
||||
parameters_no_wd = [v for k, v in get_state_dict(model).items() if "bias" in k or "LayerNorm" in k]
|
||||
parameters = [x for x in parameters if x not in set(parameters_no_wd)]
|
||||
optimizer_wd = LAMB(parameters, lr=max_lr, b1=opt_lamb_beta_1, b2=opt_lamb_beta_2, eps=epsilon, weight_decay=decay, adam=False)
|
||||
optimizer_no_wd = LAMB(parameters_no_wd, lr=max_lr, b1=opt_lamb_beta_1, b2=opt_lamb_beta_2, eps=epsilon, weight_decay=0.0, adam=False)
|
||||
optimizer_wd = LAMB(parameters, lr=max_lr, eps=epsilon, weight_decay=decay, adam=False)
|
||||
optimizer_no_wd = LAMB(parameters_no_wd, lr=max_lr, eps=epsilon, weight_decay=0.0, adam=False)
|
||||
optimizer_group = OptimizerGroup(optimizer_wd, optimizer_no_wd)
|
||||
|
||||
# ** LR scheduler **
|
||||
scheduler_wd = PolynomialDecayWithWarmup(optimizer_wd, max_lr, 0, train_steps, warmup_steps, power=poly_power)
|
||||
scheduler_no_wd = PolynomialDecayWithWarmup(optimizer_no_wd, max_lr, 0, train_steps, warmup_steps, power=poly_power)
|
||||
scheduler_group = LRSchedulerGroup(scheduler_wd, scheduler_no_wd)
|
||||
print(f"training with global batch size {GBS} for one epoch with {train_steps} steps")
|
||||
print(f"training with batch size {BS} for one epoch with {train_steps} steps")
|
||||
|
||||
# log mlperf hparams
|
||||
if MLLOGGER:
|
||||
@@ -1089,8 +715,8 @@ def train_bert():
|
||||
MLLOGGER.event(key=mllog_constants.OPT_NAME, value="LAMB")
|
||||
MLLOGGER.event(key=mllog_constants.OPT_BASE_LR, value=config["OPT_BASE_LEARNING_RATE"])
|
||||
MLLOGGER.event(key=mllog_constants.OPT_LAMB_WEIGHT_DECAY, value=config["DECAY"])
|
||||
MLLOGGER.event(key=mllog_constants.OPT_LAMB_BETA_1, value=config["OPT_LAMB_BETA_1"])
|
||||
MLLOGGER.event(key=mllog_constants.OPT_LAMB_BETA_2, value=config["OPT_LAMB_BETA_2"])
|
||||
MLLOGGER.event(key=mllog_constants.OPT_LAMB_BETA_1, value=optimizer_wd.b1)
|
||||
MLLOGGER.event(key=mllog_constants.OPT_LAMB_BETA_2, value=optimizer_wd.b2)
|
||||
MLLOGGER.event(key=mllog_constants.OPT_LAMB_LR_DECAY_POLY_POWER, value=config["POLY_POWER"])
|
||||
MLLOGGER.event(key=mllog_constants.OPT_LAMB_EPSILON, value=config["EPSILON"])
|
||||
|
||||
@@ -1107,7 +733,7 @@ def train_bert():
|
||||
previous_step = None
|
||||
if ckpt:=getenv("RESUME", ""):
|
||||
load_training_state(model, optimizer_group, scheduler_group, safe_load(ckpt))
|
||||
start_step = int(scheduler_wd.epoch_counter.item())
|
||||
start_step = int(scheduler_wd.epoch_counter.numpy().item())
|
||||
print(f"resuming from {ckpt} at step {start_step}")
|
||||
|
||||
if RUNMLPERF:
|
||||
@@ -1115,75 +741,70 @@ def train_bert():
|
||||
eval_it = iter(batch_load_val_bert(EVAL_BS))
|
||||
train_it = iter(tqdm(batch_load_train_bert(BS), total=train_steps, disable=BENCHMARK))
|
||||
for _ in range(start_step): next(train_it) # Fast forward
|
||||
else:
|
||||
# repeat fake data
|
||||
def repeat_fake(bs):
|
||||
while True: yield get_fake_data_bert(bs)
|
||||
eval_it = iter(repeat_fake(EVAL_BS))
|
||||
train_it = iter(repeat_fake(BS))
|
||||
|
||||
|
||||
step_times = []
|
||||
# ** train loop **
|
||||
wc_start = time.perf_counter()
|
||||
|
||||
i, train_data = start_step, [next(train_it) for _ in range(grad_acc)]
|
||||
|
||||
if RUNMLPERF:
|
||||
# only load real data with RUNMLPERF
|
||||
i, train_data = start_step, get_data_bert(GPUS, train_it)
|
||||
if MLLOGGER:
|
||||
MLLOGGER.start(key=mllog_constants.EPOCH_START, value=i*GBS, metadata={"epoch_num": i*GBS})
|
||||
MLLOGGER.start(key=mllog_constants.EPOCH_START, value=i*BS, metadata={"epoch_num": i*BS})
|
||||
else:
|
||||
i, train_data = start_step, get_fake_data_bert(GPUS, BS)
|
||||
|
||||
while train_data is not None and i < train_steps and not achieved:
|
||||
if getenv("TRAIN", 1):
|
||||
Tensor.training = True
|
||||
BEAM.value = TRAIN_BEAM
|
||||
st = time.perf_counter()
|
||||
GlobalCounters.reset()
|
||||
with WallTimeEvent(BenchEvent.STEP):
|
||||
data = {f"{k}{i}":v for i,d in enumerate(train_data) for k,v in d.items()}
|
||||
loss, global_norm, lr = train_step_bert(model, optimizer_group, scheduler_group, loss_scaler, GPUS, grad_acc, **data)
|
||||
Tensor.training = True
|
||||
BEAM.value = TRAIN_BEAM
|
||||
st = time.perf_counter()
|
||||
GlobalCounters.reset()
|
||||
loss = train_step_bert(model, optimizer_group, scheduler_group, loss_scaler,
|
||||
train_data["input_ids"], train_data["segment_ids"], train_data["input_mask"], train_data["masked_lm_positions"], \
|
||||
train_data["masked_lm_ids"], train_data["masked_lm_weights"], train_data["next_sentence_labels"])
|
||||
|
||||
pt = time.perf_counter()
|
||||
pt = time.perf_counter()
|
||||
|
||||
try:
|
||||
next_data = [next(train_it) for _ in range(grad_acc)]
|
||||
except StopIteration:
|
||||
next_data = None
|
||||
try:
|
||||
if RUNMLPERF:
|
||||
next_data = get_data_bert(GPUS, train_it)
|
||||
else:
|
||||
next_data = get_fake_data_bert(GPUS, BS)
|
||||
except StopIteration:
|
||||
next_data = None
|
||||
|
||||
dt = time.perf_counter()
|
||||
dt = time.perf_counter()
|
||||
|
||||
device_str = parameters[0].device if isinstance(parameters[0].device, str) else f"{parameters[0].device[0]} * {len(parameters[0].device)}"
|
||||
loss = loss.item()
|
||||
assert not math.isnan(loss)
|
||||
lr = lr.item()
|
||||
device_str = loss.device if isinstance(loss.device, str) else f"{loss.device[0]} * {len(loss.device)}"
|
||||
loss = loss.numpy().item()
|
||||
|
||||
cl = time.perf_counter()
|
||||
if BENCHMARK: step_times.append(cl - st)
|
||||
cl = time.perf_counter()
|
||||
if BENCHMARK: step_times.append(cl - st)
|
||||
|
||||
tqdm.write(
|
||||
f"{i:5} {((cl - st)) * 1000.0:7.2f} ms run, {(pt - st) * 1000.0:7.2f} ms python, {(dt - pt) * 1000.0:6.2f} ms fetch data, "
|
||||
f"{(cl - dt) * 1000.0:7.2f} ms {device_str}, {loss:5.2f} loss, {lr:.6f} LR, "
|
||||
f"{GlobalCounters.mem_used / 1e9:.2f} GB used, {GlobalCounters.global_ops * 1e-9 / (cl - st):9.2f} GFLOPS")
|
||||
if WANDB:
|
||||
wandb.log({"lr": lr, "train/loss": loss, "train/global_norm": global_norm.item(), "train/step_time": cl - st,
|
||||
"train/python_time": pt - st, "train/data_time": dt - pt, "train/cl_time": cl - dt,
|
||||
"train/GFLOPS": GlobalCounters.global_ops * 1e-9 / (cl - st), "epoch": (i+1)*GBS})
|
||||
tqdm.write(
|
||||
f"{i:5} {((cl - st)) * 1000.0:7.2f} ms run, {(pt - st) * 1000.0:7.2f} ms python, {(dt - pt) * 1000.0:6.2f} ms fetch data, "
|
||||
f"{(cl - dt) * 1000.0:7.2f} ms {device_str}, {loss:5.2f} loss, {optimizer_wd.lr.numpy()[0]:.6f} LR, "
|
||||
f"{GlobalCounters.mem_used / 1e9:.2f} GB used, {GlobalCounters.global_ops * 1e-9 / (cl - st):9.2f} GFLOPS")
|
||||
if WANDB:
|
||||
wandb.log({"lr": optimizer_wd.lr.numpy(), "train/loss": loss, "train/step_time": cl - st,
|
||||
"train/python_time": pt - st, "train/data_time": dt - pt, "train/cl_time": cl - dt,
|
||||
"train/GFLOPS": GlobalCounters.global_ops * 1e-9 / (cl - st), "epoch": (i+1)*BS})
|
||||
|
||||
train_data, next_data = next_data, None
|
||||
i += 1
|
||||
train_data, next_data = next_data, None
|
||||
i += 1
|
||||
|
||||
if i == BENCHMARK:
|
||||
median_step_time = sorted(step_times)[(BENCHMARK + 1) // 2] # in seconds
|
||||
estimated_total_minutes = int(median_step_time * train_steps / 60)
|
||||
print(f"Estimated training time: {estimated_total_minutes // 60}h{estimated_total_minutes % 60}m")
|
||||
print(f"epoch global_ops: {train_steps * GlobalCounters.global_ops:_}, "
|
||||
f"epoch global_mem: {train_steps * GlobalCounters.global_mem:_}")
|
||||
if i == BENCHMARK:
|
||||
median_step_time = sorted(step_times)[(BENCHMARK + 1) // 2] # in seconds
|
||||
estimated_total_minutes = int(median_step_time * train_steps / 60)
|
||||
print(f"Estimated training time: {estimated_total_minutes // 60}h{estimated_total_minutes % 60}m")
|
||||
print(f"epoch global_ops: {train_steps * GlobalCounters.global_ops:_}, "
|
||||
f"epoch global_mem: {train_steps * GlobalCounters.global_mem:_}")
|
||||
|
||||
# ** eval loop **
|
||||
if i % eval_step_freq == 0 or (BENCHMARK and i == BENCHMARK) or i == train_steps:
|
||||
if i % eval_step_freq == 0 or (BENCHMARK and i == BENCHMARK):
|
||||
if MLLOGGER and RUNMLPERF:
|
||||
MLLOGGER.start(key=mllog_constants.EVAL_START, value=None, metadata={"epoch_num": i*GBS, "step_num": i})
|
||||
if getenv("RESET_STEP"): train_step_bert.reset()
|
||||
elif getenv("FREE_INTERMEDIATE", 1) and train_step_bert.captured is not None: train_step_bert.captured.free_intermediates()
|
||||
MLLOGGER.start(key=mllog_constants.EVAL_START, value=None, metadata={"epoch_num": i*BS, "step_num": i})
|
||||
if getenv("RESET_STEP", 1): train_step_bert.reset()
|
||||
eval_lm_losses = []
|
||||
eval_clsf_losses = []
|
||||
eval_lm_accs = []
|
||||
@@ -1193,14 +814,19 @@ def train_bert():
|
||||
BEAM.value = EVAL_BEAM
|
||||
|
||||
for j in tqdm(range(max_eval_steps), desc="Evaluating", total=max_eval_steps, disable=BENCHMARK):
|
||||
eval_data = next(eval_it)
|
||||
if RUNMLPERF:
|
||||
eval_data = get_data_bert(GPUS, eval_it)
|
||||
else:
|
||||
eval_data = get_fake_data_bert(GPUS, EVAL_BS)
|
||||
GlobalCounters.reset()
|
||||
st = time.time()
|
||||
|
||||
lm_acc, clsf_acc, lm_loss, clsf_loss = eval_step_bert(model,
|
||||
eval_result: dict[str, Tensor] = eval_step_bert(model,
|
||||
eval_data["input_ids"], eval_data["segment_ids"], eval_data["input_mask"], eval_data["masked_lm_positions"],
|
||||
eval_data["masked_lm_ids"], eval_data["masked_lm_weights"], eval_data["next_sentence_labels"], GPUS)
|
||||
lm_acc, clsf_acc, lm_loss, clsf_loss = lm_acc.item(), clsf_acc.item(), lm_loss.item(), clsf_loss.item()
|
||||
eval_data["masked_lm_ids"], eval_data["masked_lm_weights"], eval_data["next_sentence_labels"])
|
||||
|
||||
lm_loss, clsf_loss = eval_result["masked_lm_loss"].item(), eval_result["next_sentence_loss"].item()
|
||||
lm_acc, clsf_acc = eval_result["masked_lm_accuracy"].item(), eval_result["next_sentence_accuracy"].item()
|
||||
|
||||
eval_lm_losses.append(lm_loss)
|
||||
eval_clsf_losses.append(clsf_loss)
|
||||
@@ -1210,16 +836,14 @@ def train_bert():
|
||||
et = time.time()
|
||||
eval_times.append(et - st)
|
||||
|
||||
if BENCHMARK and (j+1) == min(BENCHMARK, max_eval_steps):
|
||||
if BENCHMARK and j == BENCHMARK:
|
||||
# assume INITMLPERF has BENCHMARK set
|
||||
if MLLOGGER and INITMLPERF:
|
||||
MLLOGGER.event(key=mllog_constants.INIT_STOP, value=None)
|
||||
return
|
||||
|
||||
if getenv("RESET_STEP"): eval_step_bert.reset()
|
||||
elif getenv("FREE_INTERMEDIATE", 1) and eval_step_bert.captured is not None: eval_step_bert.captured.free_intermediates()
|
||||
|
||||
del eval_data
|
||||
if getenv("RESET_STEP", 1): eval_step_bert.reset()
|
||||
del eval_data, eval_result
|
||||
avg_lm_loss = sum(eval_lm_losses) / len(eval_lm_losses)
|
||||
avg_clsf_loss = sum(eval_clsf_losses) / len(eval_clsf_losses)
|
||||
avg_lm_acc = sum(eval_lm_accs) / len(eval_lm_accs)
|
||||
@@ -1231,11 +855,11 @@ def train_bert():
|
||||
|
||||
if WANDB:
|
||||
wandb.log({"eval/lm_loss": avg_lm_loss, "eval/clsf_loss": avg_clsf_loss, "eval/lm_accuracy": avg_lm_acc, \
|
||||
"eval/clsf_accuracy": avg_clsf_acc, "eval/forward_time": avg_fw_time, "epoch": (i+1)*GBS})
|
||||
"eval/clsf_accuracy": avg_clsf_acc, "eval/forward_time": avg_fw_time})
|
||||
|
||||
if MLLOGGER and RUNMLPERF:
|
||||
MLLOGGER.end(key=mllog_constants.EVAL_STOP, value=i*GBS, metadata={"epoch_count": i*GBS, "step_num": i, "samples_count": config["EVAL_BS"] * config["MAX_EVAL_STEPS"]})
|
||||
MLLOGGER.event(key=mllog_constants.EVAL_ACCURACY, value=avg_lm_acc, metadata={"epoch_num": i*GBS, "masked_lm_accuracy": avg_lm_acc})
|
||||
MLLOGGER.end(key=mllog_constants.EVAL_STOP, value=i*BS, metadata={"epoch_count": i*BS, "step_num": i, "samples_count": config["EVAL_BS"] * config["MAX_EVAL_STEPS"]})
|
||||
MLLOGGER.event(key=mllog_constants.EVAL_ACCURACY, value=avg_lm_acc, metadata={"epoch_num": i*BS, "masked_lm_accuracy": avg_lm_acc})
|
||||
|
||||
# save model if achieved target
|
||||
if not achieved and avg_lm_acc >= target:
|
||||
@@ -1250,22 +874,19 @@ def train_bert():
|
||||
hours = int(total_seconds // 3600)
|
||||
minutes = int((total_seconds % 3600) // 60)
|
||||
seconds = total_seconds % 60
|
||||
print(f"Reference Convergence point reached after {i * GBS} datasamples and {hours}h{minutes}m{seconds:.2f}s.")
|
||||
print(f"Reference Convergence point reached after {i * BS} datasamples and {hours}h{minutes}m{seconds:.2f}s.")
|
||||
achieved = True
|
||||
if MLLOGGER and RUNMLPERF:
|
||||
MLLOGGER.event(key=mllog_constants.EPOCH_STOP, value=i*GBS, metadata={"epoch_num": i*GBS})
|
||||
MLLOGGER.event(key=mllog_constants.EPOCH_STOP, value=i*BS, metadata={"epoch_num": i*BS})
|
||||
MLLOGGER.end(key=mllog_constants.RUN_STOP, metadata=dict(status=mllog_constants.SUCCESS))
|
||||
# stop once hitting the target
|
||||
break
|
||||
|
||||
# should not happen, BENCHMARK not properly terminated
|
||||
if BENCHMARK: assert i < BENCHMARK, i
|
||||
|
||||
if getenv("CKPT") and i % save_ckpt_freq == 0:
|
||||
if MLLOGGER and RUNMLPERF:
|
||||
if previous_step:
|
||||
MLLOGGER.end(key=mllog_constants.BLOCK_STOP, value=None, metadata={"first_epoch_num": 1, "epoch_num": 1, "first_step_num": i, "step_num": i, "step_count": i - previous_step})
|
||||
MLLOGGER.start(key="checkpoint_start", value=None, metadata={"step_num": i})
|
||||
MLLOGGER.start(key="checkpoint_start", value=None, metadata={"step_num" : i})
|
||||
if not os.path.exists(ckpt_dir := save_ckpt_dir): os.mkdir(ckpt_dir)
|
||||
if WANDB and wandb.run is not None:
|
||||
fn = f"{ckpt_dir}/{time.strftime('%Y%m%d_%H%M%S')}_{wandb.run.id}.safe"
|
||||
@@ -1281,90 +902,18 @@ def train_bert():
|
||||
os.remove(os.path.join(ckpt_dir, last))
|
||||
if MLLOGGER and RUNMLPERF:
|
||||
MLLOGGER.end(key="checkpoint_stop", value=None, metadata={"step_num": i})
|
||||
MLLOGGER.start(key=mllog_constants.BLOCK_START, value=None, metadata={"first_epoch_num": 1, "epoch_num": 1, "epoch_count": 1, "samples_count": i * GBS, "step_num": i, "first_step_num": i+1})
|
||||
MLLOGGER.start(key=mllog_constants.BLOCK_START, value=None, metadata={"first_epoch_num": 1, "epoch_num": 1, "epoch_count": 1, "samples_count": i * BS, "step_num": i, "first_step_num": i+1})
|
||||
previous_step = i
|
||||
|
||||
def train_llama3():
|
||||
from extra.models.llama import Transformer
|
||||
from examples.llama3 import MODEL_PARAMS
|
||||
from examples.mlperf.lr_schedulers import CosineAnnealingLRWithWarmup
|
||||
|
||||
config = {}
|
||||
BS = config["BS"] = getenv("BS", 4)
|
||||
grad_acc = config["GRADIENT_ACC_STEPS"] = getenv("GRADIENT_ACC_STEPS", 1)
|
||||
GBS = config["GLOBAL_BATCH_SIZE"] = BS * grad_acc
|
||||
|
||||
opt_adamw_beta_1 = 0.9
|
||||
opt_adamw_beta_2 = 0.95
|
||||
opt_adamw_epsilon = 1e-5
|
||||
opt_adamw_weight_decay = 0.1
|
||||
|
||||
opt_gradient_clip_norm = 1.0
|
||||
sequence_length = 8192
|
||||
opt_learning_rate_warmup_steps = getenv("WARMUP_STEPS", math.ceil(8000 * 1152 / GBS))
|
||||
opt_learning_rate_decay_steps = getenv("DECAY_STEPS", math.ceil(1_200_000 * 1152 / GBS) - opt_learning_rate_warmup_steps)
|
||||
opt_base_learning_rate = getenv("LR", 8e-5 * GBS / 1152) # NOTE: cannot change for benchmark
|
||||
opt_end_learning_rate = 8e-7
|
||||
|
||||
# TODO: confirm weights are in bf16
|
||||
# vocab_size from the mixtral tokenizer
|
||||
model = Transformer(**(MODEL_PARAMS[getenv("LLAMA3_SIZE", "8B")]["args"]|{"vocab_size": 32000}), max_context=sequence_length, jit=False, disable_kv_cache=True)
|
||||
|
||||
optim = AdamW(get_parameters(model), lr=0.0,
|
||||
b1=opt_adamw_beta_1, b2=opt_adamw_beta_2, eps=opt_adamw_epsilon, weight_decay=opt_adamw_weight_decay)
|
||||
scheduler = CosineAnnealingLRWithWarmup(optim, opt_base_learning_rate, opt_end_learning_rate, opt_learning_rate_warmup_steps, opt_learning_rate_decay_steps)
|
||||
|
||||
@TinyJit
|
||||
@Tensor.train()
|
||||
def train_step(model, x, y):
|
||||
optim.zero_grad()
|
||||
logits:Tensor = model(x, start_pos=0, temperature=math.nan)
|
||||
loss = logits.cross_entropy(y)
|
||||
loss.backward()
|
||||
|
||||
# L2 norm grad clip
|
||||
# https://github.com/NVIDIA/NeMo/blob/3368c3fc0b4a186ab33a1d68a504315100c0b2a6/nemo/collections/nlp/modules/common/megatron/clip_grads.py#L57
|
||||
# https://docs.pytorch.org/docs/stable/generated/torch.nn.utils.clip_grad_norm_.html
|
||||
if not getenv("DISABLE_GRAD_CLIP_NORM"):
|
||||
total_norm = Tensor(0.0, dtype=dtypes.float32, device=optim.params[0].device)
|
||||
for p in optim.params:
|
||||
total_norm += p.grad.float().square().sum()
|
||||
total_norm = total_norm.sqrt().contiguous()
|
||||
for p in optim.params:
|
||||
p.grad = p.grad * opt_gradient_clip_norm / (total_norm + 1e-6)
|
||||
|
||||
optim.step()
|
||||
scheduler.step()
|
||||
|
||||
lr = optim.lr
|
||||
loss.realize(lr)
|
||||
return loss, lr
|
||||
|
||||
# overfitting this example should give cross_entropy log(BS)
|
||||
fake_input = Tensor([list(range(getenv("SEQLEN", 10)))], dtype="int16").expand(BS, -1)
|
||||
fake_label = Tensor(list(range(BS)), dtype="int16")
|
||||
|
||||
for _ in range(100):
|
||||
GlobalCounters.reset()
|
||||
loss, lr = train_step(model, fake_input, fake_label)
|
||||
# BS=2 OPTIM_DTYPE=bfloat16 LLAMA3_SIZE=8B WARMUP_STEPS=2 DECAY_STEPS=300 PYTHONPATH=. AMD=1 MODEL=llama3 python3 examples/mlperf/model_train.py
|
||||
# uses 43% ~= 83GB
|
||||
# 8B bf16 = 16GB. model + grad + optim m and v = 64GB
|
||||
# TODO: this OOM
|
||||
# BS=1 SEQLEN=4000 OPTIM_DTYPE=bfloat16 LLAMA3_SIZE=8B WARMUP_STEPS=2 DECAY_STEPS=300 PYTHONPATH=. AMD=1 MODEL=llama3 python3 examples/mlperf/model_train.py
|
||||
print(loss.item(), lr.item(), f"{GlobalCounters.global_mem//10**9=}")
|
||||
def train_maskrcnn():
|
||||
# TODO: Mask RCNN
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
multiprocessing.set_start_method('spawn')
|
||||
|
||||
if getenv("INITMLPERF"): bench_log_manager = WallTimeEvent(BenchEvent.MLPERF_INIT)
|
||||
elif getenv("RUNMLPERF"): bench_log_manager = WallTimeEvent(BenchEvent.MLPERF_RUN)
|
||||
else: bench_log_manager = contextlib.nullcontext()
|
||||
|
||||
with Tensor.train():
|
||||
for m in getenv("MODEL", "resnet,retinanet,unet3d,rnnt,bert,maskrcnn").split(","):
|
||||
nm = f"train_{m}"
|
||||
if nm in globals():
|
||||
print(f"training {m}")
|
||||
with bench_log_manager:
|
||||
with Profiling(enabled=getenv("PYPROFILE")): globals()[nm]()
|
||||
globals()[nm]()
|
||||
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
# 1. Problem
|
||||
|
||||
This problem uses the ResNet-50 CNN to do image classification.
|
||||
|
||||
## Requirements
|
||||
|
||||
Install tinygrad and mlperf-logging from master.
|
||||
```
|
||||
git clone https://github.com/tinygrad/tinygrad.git
|
||||
python3 -m pip install -e ".[mlperf]"
|
||||
```
|
||||
|
||||
### tinybox_green
|
||||
Install the p2p driver per [README](https://github.com/tinygrad/open-gpu-kernel-modules/blob/550.54.15-p2p/README.md)
|
||||
This is the default on production tinybox green.
|
||||
|
||||
### tinybox_red
|
||||
Disable cwsr
|
||||
This is the default on production tinybox red.
|
||||
```
|
||||
sudo vi /etc/modprobe.d/amdgpu.conf
|
||||
cat <<EOF > /etc/modprobe.d/amdgpu.conf
|
||||
options amdgpu cwsr_enable=0
|
||||
EOF
|
||||
sudo update-initramfs -u
|
||||
sudo reboot
|
||||
|
||||
# validate
|
||||
sudo cat /sys/module/amdgpu/parameters/cwsr_enable #= 0
|
||||
```
|
||||
|
||||
# 2. Directions
|
||||
|
||||
## Steps to download and verify data
|
||||
|
||||
```
|
||||
IMGNET_TRAIN=1 python3 extra/datasets/imagenet_download.py
|
||||
```
|
||||
|
||||
## Steps for one time setup
|
||||
|
||||
### tinybox_red
|
||||
```
|
||||
examples/mlperf/training_submission_v4.0/tinycorp/benchmarks/resnet/implementations/tinybox_red/setup.sh
|
||||
```
|
||||
|
||||
## Steps to run benchmark
|
||||
```
|
||||
examples/mlperf/training_submission_v4.0/tinycorp/benchmarks/resnet/implementations/tinybox_red/run_and_time.sh
|
||||
```
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PYTHONPATH="."
|
||||
export MODEL="resnet"
|
||||
export DEFAULT_FLOAT="HALF" GPUS=6 BS=1536 EVAL_BS=192
|
||||
|
||||
export LAZYCACHE=0 RESET_STEP=0
|
||||
|
||||
export TRAIN_BEAM=4 IGNORE_JIT_FIRST_BEAM=1 BEAM_UOPS_MAX=1500 BEAM_UPCAST_MAX=64 BEAM_LOCAL_MAX=1024 BEAM_MIN_PROGRESS=10 BEAM_PADTO=0
|
||||
|
||||
export BENCHMARK=10 DEBUG=2
|
||||
|
||||
python3 examples/mlperf/model_train.py
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PYTHONPATH="."
|
||||
export MODEL="resnet"
|
||||
export DEFAULT_FLOAT="HALF" GPUS=6 BS=1536 EVAL_BS=192
|
||||
|
||||
export LAZYCACHE=0 RESET_STEP=0
|
||||
|
||||
export TRAIN_BEAM=4 IGNORE_JIT_FIRST_BEAM=1 BEAM_UOPS_MAX=1500 BEAM_UPCAST_MAX=64 BEAM_LOCAL_MAX=1024 BEAM_MIN_PROGRESS=10 BEAM_PADTO=0
|
||||
|
||||
export EVAL_START_EPOCH=3 EVAL_FREQ=4
|
||||
|
||||
export WANDB=1 PARALLEL=0
|
||||
|
||||
python3 examples/mlperf/model_train.py
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PYTHONPATH="."
|
||||
export MODEL="resnet"
|
||||
export SUBMISSION_PLATFORM="tinybox_green"
|
||||
export DEFAULT_FLOAT="HALF" GPUS=6 BS=1536 EVAL_BS=192
|
||||
|
||||
export LAZYCACHE=0 RESET_STEP=0
|
||||
|
||||
export TRAIN_BEAM=4 IGNORE_JIT_FIRST_BEAM=1 BEAM_UOPS_MAX=1500 BEAM_UPCAST_MAX=64 BEAM_LOCAL_MAX=1024 BEAM_MIN_PROGRESS=10 BEAM_PADTO=0
|
||||
|
||||
# pip install -e ".[mlperf]"
|
||||
export LOGMLPERF=1
|
||||
|
||||
export SEED=$RANDOM
|
||||
DATETIME=$(date "+%m%d%H%M")
|
||||
LOGFILE="resnet_green_${DATETIME}_${SEED}.log"
|
||||
|
||||
# init
|
||||
BENCHMARK=10 INITMLPERF=1 python3 examples/mlperf/model_train.py | tee $LOGFILE
|
||||
|
||||
# run
|
||||
PARALLEL=0 RUNMLPERF=1 EVAL_START_EPOCH=3 EVAL_FREQ=4 python3 examples/mlperf/model_train.py | tee -a $LOGFILE
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
# 1. Problem
|
||||
|
||||
This problem uses the ResNet-50 CNN to do image classification.
|
||||
|
||||
## Requirements
|
||||
|
||||
Install tinygrad and mlperf-logging from master.
|
||||
```
|
||||
git clone https://github.com/tinygrad/tinygrad.git
|
||||
python3 -m pip install -e ".[mlperf]"
|
||||
```
|
||||
|
||||
### tinybox_green
|
||||
Install the p2p driver per [README](https://github.com/tinygrad/open-gpu-kernel-modules/blob/550.54.15-p2p/README.md)
|
||||
This is the default on production tinybox green.
|
||||
|
||||
### tinybox_red
|
||||
Disable cwsr
|
||||
This is the default on production tinybox red.
|
||||
```
|
||||
sudo vi /etc/modprobe.d/amdgpu.conf
|
||||
cat <<EOF > /etc/modprobe.d/amdgpu.conf
|
||||
options amdgpu cwsr_enable=0
|
||||
EOF
|
||||
sudo update-initramfs -u
|
||||
sudo reboot
|
||||
|
||||
# validate
|
||||
sudo cat /sys/module/amdgpu/parameters/cwsr_enable #= 0
|
||||
```
|
||||
|
||||
# 2. Directions
|
||||
|
||||
## Steps to download and verify data
|
||||
|
||||
```
|
||||
IMGNET_TRAIN=1 python3 extra/datasets/imagenet_download.py
|
||||
```
|
||||
|
||||
## Steps for one time setup
|
||||
|
||||
### tinybox_red
|
||||
```
|
||||
examples/mlperf/training_submission_v4.0/tinycorp/benchmarks/resnet/implementations/tinybox_red/setup.sh
|
||||
```
|
||||
|
||||
## Steps to run benchmark
|
||||
```
|
||||
examples/mlperf/training_submission_v4.0/tinycorp/benchmarks/resnet/implementations/tinybox_red/run_and_time.sh
|
||||
```
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PYTHONPATH="."
|
||||
export MODEL="resnet"
|
||||
export DEFAULT_FLOAT="HALF" GPUS=6 BS=1536 EVAL_BS=192
|
||||
|
||||
export LAZYCACHE=0 RESET_STEP=0
|
||||
|
||||
export TRAIN_BEAM=4 IGNORE_JIT_FIRST_BEAM=1 BEAM_UOPS_MAX=2000 BEAM_UPCAST_MAX=96 BEAM_LOCAL_MAX=1024 BEAM_MIN_PROGRESS=5 BEAM_PADTO=0
|
||||
|
||||
export BENCHMARK=10 DEBUG=2
|
||||
|
||||
python3 examples/mlperf/model_train.py
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PYTHONPATH="."
|
||||
export MODEL="resnet"
|
||||
export DEFAULT_FLOAT="HALF" GPUS=6 BS=1536 EVAL_BS=192
|
||||
|
||||
export LAZYCACHE=0 RESET_STEP=0
|
||||
|
||||
export TRAIN_BEAM=4 IGNORE_JIT_FIRST_BEAM=1 BEAM_UOPS_MAX=2000 BEAM_UPCAST_MAX=96 BEAM_LOCAL_MAX=1024 BEAM_MIN_PROGRESS=5 BEAM_PADTO=0
|
||||
|
||||
export EVAL_START_EPOCH=3 EVAL_FREQ=4
|
||||
|
||||
export WANDB=1 PARALLEL=0
|
||||
|
||||
python3 examples/mlperf/model_train.py
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PYTHONPATH="."
|
||||
export MODEL="resnet"
|
||||
export SUBMISSION_PLATFORM="tinybox_red"
|
||||
export DEFAULT_FLOAT="HALF" GPUS=6 BS=1536 EVAL_BS=192
|
||||
|
||||
export LAZYCACHE=0 RESET_STEP=0
|
||||
|
||||
export TRAIN_BEAM=4 IGNORE_JIT_FIRST_BEAM=1 BEAM_UOPS_MAX=2000 BEAM_UPCAST_MAX=96 BEAM_LOCAL_MAX=1024 BEAM_MIN_PROGRESS=5 BEAM_PADTO=0
|
||||
|
||||
# pip install -e ".[mlperf]"
|
||||
export LOGMLPERF=1
|
||||
|
||||
export SEED=$RANDOM
|
||||
DATETIME=$(date "+%m%d%H%M")
|
||||
LOGFILE="resnet_red_${DATETIME}_${SEED}.log"
|
||||
|
||||
# init
|
||||
BENCHMARK=10 INITMLPERF=1 python3 examples/mlperf/model_train.py | tee $LOGFILE
|
||||
|
||||
# run
|
||||
PARALLEL=0 RUNMLPERF=1 EVAL_START_EPOCH=3 EVAL_FREQ=4 python3 examples/mlperf/model_train.py | tee -a $LOGFILE
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rocm-smi --setprofile compute
|
||||
rocm-smi --setmclk 3
|
||||
rocm-smi --setperflevel high
|
||||
|
||||
# power cap to 350W
|
||||
echo "350000000" | sudo tee /sys/class/drm/card{1..6}/device/hwmon/hwmon*/power1_cap
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516968768, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516968782, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_green", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516968782, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516968782, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516968782, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516968917, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516968917, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518095273, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518110874, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125400, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125401, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125401, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125401, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125401, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125401, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125402, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125402, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125402, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125402, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125402, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125402, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125402, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125402, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125403, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125403, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518125403, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518171154, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728519204577, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728519263743, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728519263744, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38641827217854635, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38641827217854635}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728520267792, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728520321266, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728520321266, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.40444660376272445, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.40444660376272445}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728521322547, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728521376298, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728521376298, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4533385156548231, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.4533385156548231}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728522377080, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728522429361, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728522429362, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5267527467952778, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5267527467952778}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728523431856, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728523485950, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728523485951, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6413663900499224, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6413663900499224}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524487365, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524539365, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524539365, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7015928945715869, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.7015928945715869}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728525540578, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728525593684, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728525593684, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7095211997458373, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7095211997458373}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526596673, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526649935, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526649936, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.712105579231768, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.712105579231768}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527652974, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527704774, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527704774, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7137153520152179, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7137153520152179}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728528706518, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728528759227, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728528759227, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7148766237672532, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7148766237672532}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529761683, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529814822, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529814823, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7160955339258992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7160955339258992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530822786, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530876907, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530876907, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.716297444534931, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.716297444534931}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531883583, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531936703, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531936703, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7177683101775908, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7177683101775908}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728532940983, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728532993183, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728532993183, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.718530326026889, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.718530326026889}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728534011810, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728534065533, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728534065533, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7185927641985298, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7185927641985298}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535067978, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535122144, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535122145, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7192297569276619, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7192297569276619}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536131543, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536184105, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536184105, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7197693878473032, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7197693878473032}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537200158, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537253408, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537253408, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7199979490266993, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7199979490266993}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538262628, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538316185, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538316186, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7208575420416825, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7208575420416825}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538316186, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2849088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538316186, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538316186, "event_type": "POINT_IN_TIME", "key": "seed", "value": 6505, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538334148, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538334162, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_green", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538334162, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538334162, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538334162, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538334302, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538334302, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539452588, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539466234, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480889, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480890, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480890, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480890, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480890, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480890, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480890, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480891, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480891, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480891, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480891, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480891, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480891, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480891, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480891, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480892, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539480892, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539531181, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728540563757, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728540627488, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728540627488, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38798193001575504, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38798193001575504}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728541627605, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728541684840, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728541684840, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4043695551053306, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.4043695551053306}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542682448, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542739985, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542739985, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.43848311595381845, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.43848311595381845}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543736385, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543792735, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543792736, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.519008471802029, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.519008471802029}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544788834, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544846253, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544846253, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6122590443583112, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6122590443583112}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545843895, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545901605, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545901606, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.687927868134545, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.687927868134545}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546896899, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546954045, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546954045, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7037530967627161, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7037530967627161}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728547951266, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548007399, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548007400, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7094319296154922, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7094319296154922}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549002681, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549061015, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549061015, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7113743569225913, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7113743569225913}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550055497, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550112524, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550112524, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7128702056715427, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7128702056715427}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728551106231, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728551163221, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728551163221, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7141216593941458, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7141216593941458}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552166923, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552223146, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552223147, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7146758918069978, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7146758918069978}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728553218362, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728553275684, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728553275684, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7159770885197503, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7159770885197503}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728554271310, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728554328503, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728554328503, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7166727805252052, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7166727805252052}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555323857, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555381026, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555381026, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7173972926457342, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7173972926457342}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556388293, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556444413, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556444413, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7175414781407389, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7175414781407389}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557446881, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557503528, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557503528, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7179403612909735, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7179403612909735}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558506474, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558562665, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558562665, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7183986956585505, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7183986956585505}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559573313, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559631801, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559631801, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7190847733311119, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7190847733311119}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728560634330, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728560690618, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728560690618, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7193026458280274, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.7193026458280274}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561686592, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3148992, "step_num": 47712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561743999, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3148992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3148992, "step_num": 47712, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561743999, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7195320777644207, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3148992, "masked_lm_accuracy": 0.7195320777644207}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562740953, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3298944, "step_num": 49984}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562797084, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3298944, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3298944, "step_num": 49984, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562797084, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7198491232010441, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3298944, "masked_lm_accuracy": 0.7198491232010441}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563794843, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3448896, "step_num": 52256}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563851217, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3448896, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3448896, "step_num": 52256, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563851218, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7201704975009752, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3448896, "masked_lm_accuracy": 0.7201704975009752}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563851218, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 3448896, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 3448896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563851218, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563851218, "event_type": "POINT_IN_TIME", "key": "seed", "value": 20151, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563867610, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563867623, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_green", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563867623, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563867623, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563867623, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563867760, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563867761, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564959716, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564973303, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988006, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988006, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988006, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988006, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988006, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988007, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988007, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988007, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988007, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988007, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988007, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988007, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988008, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988008, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988008, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988008, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564988008, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728565046616, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728566082579, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728566146228, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728566146228, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.3875764702688668, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.3875764702688668}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567148838, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567205854, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567205855, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4064989212786429, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.4064989212786429}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568204176, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568261886, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568261886, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4445486674068499, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.4445486674068499}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728569260373, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728569317827, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728569317827, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5039052128362741, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5039052128362741}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570316014, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570373692, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570373692, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5860576768012982, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.5860576768012982}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571372081, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571429048, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571429048, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6553790274678981, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.6553790274678981}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728572429036, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728572485646, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728572485646, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.695299510013292, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.695299510013292}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573485353, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573541985, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573541985, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7060198057319994, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7060198057319994}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574539420, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574596892, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574596892, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7096440969074137, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7096440969074137}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728575594573, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728575651826, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728575651827, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7117632173033053, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7117632173033053}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728576649028, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728576706272, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728576706273, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7133303043652096, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7133303043652096}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728577704079, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728577761356, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728577761356, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7137490666835123, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7137490666835123}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578758647, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578815837, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578815837, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7155028079610137, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7155028079610137}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579812964, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579870775, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579870776, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7161324361018528, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7161324361018528}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580866942, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580924299, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580924299, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7167852242763842, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7167852242763842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728581922472, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728581979021, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728581979022, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7176919813705335, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7176919813705335}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728582983990, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728583040463, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728583040464, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7181049583197069, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7181049583197069}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584044016, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584101869, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584101869, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7182932556855443, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7182932556855443}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585118787, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585176571, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585176571, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7189288123968338, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7189288123968338}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728586176081, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728586233843, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728586233843, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7190464254475384, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.7190464254475384}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728587233422, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3148992, "step_num": 47712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728587290110, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3148992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3148992, "step_num": 47712, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728587290111, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7189439674587971, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3148992, "masked_lm_accuracy": 0.7189439674587971}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728588298920, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3298944, "step_num": 49984}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728588356857, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3298944, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3298944, "step_num": 49984, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728588356858, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7195348424974429, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3298944, "masked_lm_accuracy": 0.7195348424974429}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589362222, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3448896, "step_num": 52256}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589419360, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3448896, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3448896, "step_num": 52256, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589419360, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7198157412389402, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3448896, "masked_lm_accuracy": 0.7198157412389402}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590419216, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3598848, "step_num": 54528}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590477169, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3598848, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3598848, "step_num": 54528, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590477170, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7196774663650568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3598848, "masked_lm_accuracy": 0.7196774663650568}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590477170, "event_type": "POINT_IN_TIME", "key": "seed", "value": 15936, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590796935, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590796948, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_green", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590796948, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590796949, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590796949, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590797097, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590797098, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591915361, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591929057, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943823, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943823, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943826, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591989241, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593032285, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593096400, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593096400, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38762320266130373, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38762320266130373}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594107968, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594165957, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594165958, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.41101139415576204, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.41101139415576204}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595175795, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595232491, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595232492, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4496020218106037, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.4496020218106037}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596242699, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596299316, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596299317, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5736796348911599, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5736796348911599}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728597307215, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728597365230, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728597365230, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6932630223218166, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6932630223218166}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598375878, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598433374, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598433374, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7074951962503617, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.7074951962503617}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599442119, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599498818, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599498818, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7122511012366809, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7122511012366809}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600507693, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600566544, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600566545, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7142625644525941, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7142625644525941}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601572961, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601630426, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601630427, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7150282886618973, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7150282886618973}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728602641519, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728602697877, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728602697878, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7163425168378953, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7163425168378953}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728603708872, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728603765541, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728603765541, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7169951724305293, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7169951724305293}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604783436, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604840983, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604840983, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7174601919220533, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7174601919220533}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605853878, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605911397, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605911397, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.718169204153268, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.718169204153268}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728606921863, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728606978402, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728606978403, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7192717549253096, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7192717549253096}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728607995812, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728608053682, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728608053682, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7194449275499629, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7194449275499629}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609084329, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609142724, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609142725, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7200488402375792, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7200488402375792}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609142725, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2399232}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609142725, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609142725, "event_type": "POINT_IN_TIME", "key": "seed", "value": 20762, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609159110, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609159123, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_green", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609159123, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609159124, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609159124, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609159270, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609159271, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610267217, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610281092, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295781, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295781, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295781, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295782, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295782, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295782, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295782, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295782, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295782, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295782, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295782, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295783, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295783, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295783, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295783, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295783, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610295783, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610347873, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728611397047, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728611461353, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728611461353, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38775324024121494, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38775324024121494}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728612481307, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728612538833, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728612538833, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4005705962727437, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.4005705962727437}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728613556463, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728613613480, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728613613480, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4705434759434069, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.4705434759434069}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728614631311, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728614687851, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728614687851, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5429764502622013, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5429764502622013}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728615706690, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728615763381, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728615763381, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6442740782693109, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6442740782693109}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728616781291, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728616838087, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728616838087, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6980952795351345, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.6980952795351345}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728617855821, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728617912283, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728617912283, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.707689059052413, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.707689059052413}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618929847, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618986661, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618986661, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7109381170707616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7109381170707616}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728620004644, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728620061231, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728620061231, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.712553325461712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.712553325461712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621080635, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621138171, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621138171, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.714370012497859, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.714370012497859}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622165561, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622221929, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622221929, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7153810627029982, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7153810627029982}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728623242362, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728623299587, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728623299588, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7157506428582981, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7157506428582981}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728624319084, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728624376686, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728624376687, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.716899270201845, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.716899270201845}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625402109, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625460126, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625460126, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7170993249861152, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7170993249861152}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626480567, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626539447, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626539448, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7173656942820077, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7173656942820077}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627566869, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627623861, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627623862, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7182765536917565, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7182765536917565}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628643742, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628701681, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628701681, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7185246580435118, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7185246580435118}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728629728019, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728629785903, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728629785903, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7187082183954597, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7187082183954597}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630806207, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630863277, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630863277, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7192723798623111, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7192723798623111}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631896497, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631954615, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631954616, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7195008011299047, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.7195008011299047}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728632984222, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3148992, "step_num": 47712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728633041346, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3148992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3148992, "step_num": 47712, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728633041346, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7195586102339202, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3148992, "masked_lm_accuracy": 0.7195586102339202}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634068369, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3298944, "step_num": 49984}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634127804, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3298944, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3298944, "step_num": 49984, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634127805, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7202416826810534, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3298944, "masked_lm_accuracy": 0.7202416826810534}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634127805, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 3298944, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 3298944}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634127805, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634127805, "event_type": "POINT_IN_TIME", "key": "seed", "value": 219, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524965239, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524965253, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_green", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524965253, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524965253, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524965253, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524965392, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524965393, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526062933, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526077625, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092468, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092468, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092468, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092468, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092469, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092469, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092469, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092469, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092469, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092469, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092469, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092470, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092470, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092470, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092470, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092470, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526092470, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526138852, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527173955, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527237057, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527237057, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.3877335678748049, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.3877335678748049}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728528242671, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728528300179, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728528300179, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.40263391588716785, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.40263391588716785}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529303573, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529359959, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529359959, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.42964756483436706, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.42964756483436706}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530364689, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530422126, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530422126, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4922114010334873, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.4922114010334873}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531424135, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531481285, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531481286, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5822947872707639, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.5822947872707639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728532482693, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728532539641, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728532539641, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6813526992749224, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.6813526992749224}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728533542012, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728533599055, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728533599056, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7051245396052854, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7051245396052854}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728534601465, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728534657337, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728534657337, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7107940144930761, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7107940144930761}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535659894, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535716827, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535716827, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7130225877169728, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7130225877169728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536719704, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536776465, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536776465, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7149506402573474, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7149506402573474}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537786290, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537844483, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537844483, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7156235970418183, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7156235970418183}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538854316, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538910323, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538910323, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.716550941694691, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.716550941694691}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539924500, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539982702, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539982702, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7173966967065533, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7173966967065533}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728540985244, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728541042328, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728541042329, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7179239220295971, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7179239220295971}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542045079, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542102249, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542102249, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7180614758195746, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7180614758195746}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543106186, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543163150, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543163150, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7188610007967431, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7188610007967431}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544166236, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544222285, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544222285, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7190189941528677, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7190189941528677}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545224291, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545280273, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545280273, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7189939534442469, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7189939534442469}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546290997, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546348255, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546348255, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7197046605641069, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7197046605641069}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728547370392, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728547427703, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728547427704, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7198148297920296, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.7198148297920296}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548433236, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3148992, "step_num": 47712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548489162, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3148992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3148992, "step_num": 47712, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548489163, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7201927967892483, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3148992, "masked_lm_accuracy": 0.7201927967892483}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548489163, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 3148992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 3148992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548489163, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548489163, "event_type": "POINT_IN_TIME", "key": "seed", "value": 28210, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548506444, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548506457, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_green", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548506458, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548506458, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548506458, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548506735, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548506735, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549621641, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549635270, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652872, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652872, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652872, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652872, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652872, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652873, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652873, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652873, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652873, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652873, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652873, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652873, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652873, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652873, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652874, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652874, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549652874, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549705049, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550749936, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550814006, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550814007, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.3879261584913366, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.3879261584913366}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728551828200, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728551884657, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728551884657, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.40485212616242544, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.40485212616242544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552894731, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552950982, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552950982, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.44991275376735795, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.44991275376735795}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728553961756, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728554019767, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728554019768, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5169473737210089, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5169473737210089}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555028196, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555084535, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555084536, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6089998500284207, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6089998500284207}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556093244, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556150861, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556150861, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6900064689568152, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.6900064689568152}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557159270, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557216649, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557216649, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7058100798706416, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7058100798706416}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558223895, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558281962, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558281962, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7103145412148726, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7103145412148726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559289692, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559346801, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559346801, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7119302401016341, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7119302401016341}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728560353303, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728560410326, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728560410327, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7139668108176956, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7139668108176956}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561418512, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561474810, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561474810, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.715211286184383, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.715211286184383}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562483778, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562541169, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562541169, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7157247102968551, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7157247102968551}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563551560, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563609899, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563609899, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.717246541128805, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.717246541128805}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564615944, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564673046, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564673046, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7174253223824801, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7174253223824801}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728565680391, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728565737965, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728565737965, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7175353851658753, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7175353851658753}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728566749670, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728566807129, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728566807130, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7185968662280842, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7185968662280842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567827685, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567883857, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567883857, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7189708248755141, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7189708248755141}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568903914, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568961416, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568961416, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7191977317131559, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7191977317131559}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728569970441, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570027956, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570027956, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7201856829552287, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7201856829552287}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570027957, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2849088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570027957, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570027957, "event_type": "POINT_IN_TIME", "key": "seed", "value": 10448, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570044042, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570044056, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_green", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570044056, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570044056, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570044056, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570044375, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570044375, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571155314, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571169188, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185077, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185077, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185077, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185077, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185077, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185078, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185078, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185078, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185078, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185078, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185078, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185078, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185079, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185079, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185079, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185079, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571185079, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571232077, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728572260932, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728572324272, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728572324272, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.3880780045687258, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.3880780045687258}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573321862, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573379098, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573379099, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4047361867257629, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.4047361867257629}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574372317, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574430334, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574430334, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4497806984254108, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.4497806984254108}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728575423648, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728575480052, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728575480052, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5134892886673252, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5134892886673252}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728576473686, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728576529490, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728576529490, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6072650871808899, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6072650871808899}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728577521455, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728577578395, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728577578395, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6880894238246581, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.6880894238246581}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578569253, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578627203, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578627203, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7046831176176569, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7046831176176569}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579618293, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579675086, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579675087, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7089016024552924, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7089016024552924}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580666335, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580724803, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580724804, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7109720907171257, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7109720907171257}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728581716985, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728581773028, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728581773028, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7131220351884519, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7131220351884519}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728582764878, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728582822486, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728582822487, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7144350144916047, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7144350144916047}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728583814857, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728583872551, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728583872551, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7149028261407235, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7149028261407235}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584862980, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584919984, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584919984, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7159077662798052, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7159077662798052}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585920409, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585976497, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585976497, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7165625739683987, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7165625739683987}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728586977974, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728587034924, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728587034924, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.716636929886743, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.716636929886743}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728588046632, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728588103542, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728588103543, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7177939713180029, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7177939713180029}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589095819, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589153039, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589153040, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.718201180382553, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.718201180382553}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590145828, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590203087, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590203087, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7187695578679255, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7187695578679255}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591195213, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591252415, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591252415, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7192902017941215, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7192902017941215}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728592251653, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728592309614, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728592309614, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7194759279721928, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.7194759279721928}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593301651, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3148992, "step_num": 47712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593358684, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3148992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3148992, "step_num": 47712, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593358684, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7194070329763393, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3148992, "masked_lm_accuracy": 0.7194070329763393}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594357831, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3298944, "step_num": 49984}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594414864, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3298944, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3298944, "step_num": 49984, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594414864, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7200078809769052, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3298944, "masked_lm_accuracy": 0.7200078809769052}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594414864, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 3298944, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 3298944}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594414864, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594414864, "event_type": "POINT_IN_TIME", "key": "seed", "value": 10752, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590796935, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590796948, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_green", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590796948, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590796949, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590796949, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590797097, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590797098, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591915361, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591929057, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943823, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943823, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943824, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943825, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591943826, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591989241, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593032285, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593096400, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593096400, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38762320266130373, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38762320266130373}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594107968, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594165957, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594165958, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.41101139415576204, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.41101139415576204}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595175795, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595232491, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595232492, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4496020218106037, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.4496020218106037}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596242699, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596299316, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596299317, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5736796348911599, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5736796348911599}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728597307215, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728597365230, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728597365230, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6932630223218166, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6932630223218166}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598375878, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598433374, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598433374, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7074951962503617, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.7074951962503617}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599442119, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599498818, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599498818, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7122511012366809, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7122511012366809}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600507693, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600566544, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600566545, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7142625644525941, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7142625644525941}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601572961, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601630426, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601630427, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7150282886618973, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7150282886618973}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728602641519, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728602697877, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728602697878, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7163425168378953, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7163425168378953}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728603708872, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728603765541, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728603765541, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7169951724305293, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7169951724305293}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604783436, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604840983, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604840983, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7174601919220533, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7174601919220533}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605853878, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605911397, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605911397, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.718169204153268, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.718169204153268}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728606921863, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728606978402, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728606978403, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7192717549253096, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7192717549253096}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728607995812, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728608053682, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728608053682, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7194449275499629, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7194449275499629}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609084329, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609142724, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609142725, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7200488402375792, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7200488402375792}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609142725, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2399232}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609142725, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609142725, "event_type": "POINT_IN_TIME", "key": "seed", "value": 22978, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618801034, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618801047, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_green", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618801048, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618801048, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618801048, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618801209, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618801209, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619929327, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619943087, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957912, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957913, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957913, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957913, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957913, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957913, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957913, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957913, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957914, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957914, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957914, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957914, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957914, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957914, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957914, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957914, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619957915, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728620007681, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621045859, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621108773, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621108773, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.3865617481387155, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.3865617481387155}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622114605, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622171150, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622171151, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.40262117073717557, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.40262117073717557}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728623174052, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728623230873, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728623230873, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4523024549724531, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.4523024549724531}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728624233281, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728624289615, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728624289616, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5221301693185476, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5221301693185476}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625291673, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625349229, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625349230, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6420224388345102, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6420224388345102}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626351043, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626408667, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626408667, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.699528387405233, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.699528387405233}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627410463, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627466811, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627466811, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7079550924241078, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7079550924241078}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628468561, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628525964, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628525965, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7118257526945195, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7118257526945195}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728629528193, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728629584413, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728629584413, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7130748185842568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7130748185842568}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630587761, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630645519, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630645520, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.714902451421661, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.714902451421661}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631646942, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631704444, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631704445, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7154911232337883, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7154911232337883}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728632715855, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728632772059, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728632772059, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7161726189646523, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7161726189646523}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728633776195, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728633832753, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728633832753, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7168811186745844, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7168811186745844}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634841112, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634897563, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634897563, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7172674153762159, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7172674153762159}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728635899496, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728635956963, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728635956963, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.717885359040119, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.717885359040119}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728636964772, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728637021152, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728637021152, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.718571519987556, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.718571519987556}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728638039702, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728638096247, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728638096247, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7190522497187993, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7190522497187993}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728639099786, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728639156384, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728639156384, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7190969545610951, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7190969545610951}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728640172070, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728640229709, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728640229709, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7197579530877272, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7197579530877272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728641233638, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728641290427, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728641290427, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7200084952587272, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.7200084952587272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728641290427, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2999040}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728641290428, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728641290428, "event_type": "POINT_IN_TIME", "key": "seed", "value": 9634, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516945293, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516945306, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_red", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516945306, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516945307, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516945307, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516945490, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728516945491, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518502722, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518514008, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528257, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528257, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528258, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528258, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528258, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528258, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528258, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528258, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528258, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528259, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528259, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528259, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528259, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528259, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528259, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528259, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518528259, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728518578008, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728519789747, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728519848812, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728519848813, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38834677969150794, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38834677969150794}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728521004546, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728521057409, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728521057409, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.40273311821800833, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.40273311821800833}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728522209891, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728522262867, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728522262867, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.44312383646584586, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.44312383646584586}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728523414970, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728523467811, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728523467812, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5062930049407103, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5062930049407103}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524621021, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524672880, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524672880, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5888718058230566, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.5888718058230566}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728525825012, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728525878025, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728525878025, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6833749091689574, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.6833749091689574}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527029872, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527083655, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527083655, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7040974767750154, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7040974767750154}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728528235285, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728528288182, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728528288183, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7093540651038799, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7093540651038799}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529439469, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529492117, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529492117, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7120359153824791, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7120359153824791}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530643295, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530695998, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530695999, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7137061499448043, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7137061499448043}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531854130, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531905972, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531905973, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7148870925168185, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7148870925168185}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728533058059, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728533110923, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728533110923, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7155579556657943, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7155579556657943}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728534262752, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728534314582, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728534314582, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.716432806969261, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.716432806969261}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535466733, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535518647, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535518647, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7171081434700685, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7171081434700685}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536674344, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536727210, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536727211, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7175339546901564, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7175339546901564}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537884762, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537937482, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537937482, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.718394822250531, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.718394822250531}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539088991, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539141647, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539141648, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7188054349298025, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7188054349298025}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728540309614, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728540362635, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728540362635, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7188799817474859, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7188799817474859}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728541513809, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728541567687, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728541567687, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7195802817962523, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7195802817962523}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542725822, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542778626, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542778627, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.719959929272595, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.719959929272595}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543937336, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3148992, "step_num": 47712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543990349, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3148992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3148992, "step_num": 47712, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543990349, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7200285581392518, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3148992, "masked_lm_accuracy": 0.7200285581392518}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543990349, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 3148992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 3148992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543990349, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543990349, "event_type": "POINT_IN_TIME", "key": "seed", "value": 21254, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544003831, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544003844, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_red", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544003844, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544003844, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544003845, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544004114, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544004115, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545567231, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545577478, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591839, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591839, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591839, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591839, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591840, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591840, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591840, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591840, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591840, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591840, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591840, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591840, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591841, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591841, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591841, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591841, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545591841, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728545644357, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546841240, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546898744, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546898744, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38783227444481694, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38783227444481694}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548039569, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548092787, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548092788, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4103626927252508, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.4103626927252508}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549229970, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549283151, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549283152, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.45124479976326815, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.45124479976326815}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550420161, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550473622, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550473623, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5112407873616508, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5112407873616508}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728551611312, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728551664679, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728551664679, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6004241028086611, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6004241028086611}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552801410, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552853292, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552853292, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6789556939443143, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.6789556939443143}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728553989456, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728554042458, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728554042458, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7036405706305524, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7036405706305524}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555178691, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555231909, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555231909, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7080815071178612, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7080815071178612}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556368078, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556420173, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556420173, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7108210982072117, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7108210982072117}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557556063, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557608016, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557608016, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7125928249628013, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7125928249628013}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558744467, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558796348, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558796348, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7135176017174266, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7135176017174266}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559932625, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559984418, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559984418, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7145863458576786, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7145863458576786}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561120215, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561173235, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561173236, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7155747616727265, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7155747616727265}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562309022, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562360931, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562360931, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7163686522768155, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7163686522768155}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563501949, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563554781, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563554781, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.716544431773359, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.716544431773359}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564690440, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564743201, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564743201, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7175336914214104, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7175336914214104}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728565883246, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728565936169, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728565936169, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7186442701202992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7186442701202992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567078310, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567130373, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567130374, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7184390328784295, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7184390328784295}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568270051, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568322854, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568322854, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7190133258834455, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7190133258834455}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728569476727, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728569528906, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728569528906, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7193232258423117, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.7193232258423117}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570672300, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3148992, "step_num": 47712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570725375, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3148992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3148992, "step_num": 47712, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570725375, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7193006322136452, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3148992, "masked_lm_accuracy": 0.7193006322136452}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571862039, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3298944, "step_num": 49984}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571914059, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3298944, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3298944, "step_num": 49984, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571914060, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.71975367935961, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3298944, "masked_lm_accuracy": 0.71975367935961}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573050479, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3448896, "step_num": 52256}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573103486, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3448896, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3448896, "step_num": 52256, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573103487, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7200944615325745, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3448896, "masked_lm_accuracy": 0.7200944615325745}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573103487, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 3448896, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 3448896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573103487, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573103487, "event_type": "POINT_IN_TIME", "key": "seed", "value": 31023, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573115586, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573115599, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_red", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573115600, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573115600, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573115600, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573115806, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573115807, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574701526, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574711971, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726511, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726512, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726512, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726512, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726512, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726512, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726512, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726512, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726513, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726513, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726513, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726513, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726513, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726513, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726513, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726513, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574726514, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574767832, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728575974065, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728576033823, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728576033823, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.3871400942148816, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.3871400942148816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728577185498, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728577237616, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728577237616, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.39147048244665106, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.39147048244665106}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578385099, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578438339, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578438339, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.45783117753199354, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.45783117753199354}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579586799, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579639018, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579639018, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5536425763000323, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5536425763000323}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580787082, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580840252, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580840252, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6808095073800067, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6808095073800067}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728581987844, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728582039916, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728582039917, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.70571623852529, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.70571623852529}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728583186452, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728583239391, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728583239392, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7116154495584228, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7116154495584228}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584385675, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584438607, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584438607, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7138893727993064, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7138893727993064}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585586366, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585638448, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585638449, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7147087185198344, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7147087185198344}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728586785128, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728586837097, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728586837097, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7161258058628066, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7161258058628066}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728587983727, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728588035691, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728588035692, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7175371565358254, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7175371565358254}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589188060, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589241204, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589241204, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.71796901310427, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.71796901310427}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590398050, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590450110, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590450111, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7184663905522461, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7184663905522461}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591601749, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591654909, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591654909, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7191987109527519, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7191987109527519}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728592801533, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728592853668, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728592853668, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7193377415935079, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7193377415935079}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594003086, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594056207, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594056207, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7198944457577029, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7198944457577029}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595208245, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595261648, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595261648, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7206625282657168, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7206625282657168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595261648, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2549184}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595261648, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595261648, "event_type": "POINT_IN_TIME", "key": "seed", "value": 6117, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595273658, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595273672, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_red", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595273672, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595273672, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595273672, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595273864, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595273865, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596851159, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596861539, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876123, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876124, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876124, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876124, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876124, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876124, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876124, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876125, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876125, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876125, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876125, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876125, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876125, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876125, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876126, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876126, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596876126, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596921065, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598131675, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598191093, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598191093, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38629304813852405, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38629304813852405}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599345629, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599399811, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599399812, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4057833703070539, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.4057833703070539}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600550664, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600603826, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600603826, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4394682460404758, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.4394682460404758}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601755405, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601807545, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601807545, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5091635388711576, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5091635388711576}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728602959507, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728603011549, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728603011550, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6130874210764136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6130874210764136}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604163051, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604215106, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604215107, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6886828500994252, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.6886828500994252}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605365869, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605418812, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605418812, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7043221683007339, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7043221683007339}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728606570227, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728606622252, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728606622252, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7098102495208356, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7098102495208356}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728607773165, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728607826339, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728607826339, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7117401148361865, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7117401148361865}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728608976638, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609028698, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609028698, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7135091588821822, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7135091588821822}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610184971, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610238021, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610238021, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.714804682570013, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.714804682570013}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728611388386, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728611441326, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728611441326, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7155881319921319, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7155881319921319}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728612596531, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728612648484, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728612648485, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7166956780410199, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7166956780410199}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728613799458, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728613851376, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728613851376, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7175573623673818, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7175573623673818}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728615017853, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728615070888, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728615070888, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7177324852295528, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7177324852295528}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728616224796, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728616276794, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728616276794, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7187149448529216, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7187149448529216}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728617427166, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728617480097, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728617480098, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7189440351084598, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7189440351084598}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618630518, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618683523, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618683524, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7189651959015355, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7189651959015355}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619834438, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619886484, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619886484, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7197905807489396, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7197905807489396}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621047498, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621100440, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621100440, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7202326569216796, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.7202326569216796}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621100441, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2999040}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621100441, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621100441, "event_type": "POINT_IN_TIME", "key": "seed", "value": 18962, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621113036, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621113050, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_red", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621113050, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621113050, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621113050, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621113364, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621113364, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622708323, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622718838, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734010, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734010, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734010, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734011, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734011, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734011, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734011, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734011, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734011, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734012, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734012, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734012, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734012, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734012, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734012, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734012, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622734013, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622779756, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728623989242, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728624047931, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728624047931, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38761837577562386, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38761837577562386}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625199877, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625251862, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625251862, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.3991255365093096, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.3991255365093096}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626401253, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626454238, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626454239, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4629036359752662, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.4629036359752662}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627603380, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627655201, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627655201, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5288661295558138, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5288661295558138}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628804682, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628857572, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628857573, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6336066501184932, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6336066501184932}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630005680, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630057532, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630057532, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.698150883303049, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.698150883303049}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631206492, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631258444, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631258444, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7087594178456637, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7087594178456637}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728632406126, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728632458945, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728632458946, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.712074551420721, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.712074551420721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728633607305, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728633660325, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728633660325, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7133723366167564, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7133723366167564}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634807043, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634859650, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634859650, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7153185129380183, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7153185129380183}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728636007670, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728636060454, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728636060454, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7153358636105497, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7153358636105497}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728637212672, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728637266430, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728637266431, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7166292644147753, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7166292644147753}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728638413489, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728638466302, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728638466303, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.717635804439778, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.717635804439778}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728639621382, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728639673232, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728639673232, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7184983831576123, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7184983831576123}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728640830900, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728640882936, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728640882936, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7185333441243461, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7185333441243461}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728642038106, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728642090127, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728642090127, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.71883562362759, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.71883562362759}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728643238601, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728643291575, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728643291575, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7195813601862262, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7195813601862262}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728644439777, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728644491633, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728644491633, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7200058278167899, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7200058278167899}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728644491633, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2699136}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728644491633, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728644491633, "event_type": "POINT_IN_TIME", "key": "seed", "value": 7451, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524927811, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524927825, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_red", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524927825, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524927825, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524927825, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524927826, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728524927826, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526542156, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526553341, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570472, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570473, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570473, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570473, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570473, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570473, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570473, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570474, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570474, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570474, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570474, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570474, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570474, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570474, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570474, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570475, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526570475, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728526620720, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527836136, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527898691, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728527898691, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.3863042194326981, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.3863042194326981}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529058617, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529115079, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728529115080, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.40961273735915393, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.40961273735915393}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530272495, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530328049, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728530328049, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.43488811103970115, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.43488811103970115}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531485648, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531541201, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728531541201, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4996365338081218, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.4996365338081218}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728532697882, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728532753299, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728532753299, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5947849176998402, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.5947849176998402}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728533910552, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728533966102, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728533966102, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.690821249612306, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.690821249612306}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535121207, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535177526, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728535177526, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7054878836201564, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7054878836201564}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536332776, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536389219, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728536389220, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7097416914145819, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7097416914145819}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537544044, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537599323, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728537599324, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7116119135763378, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7116119135763378}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538754453, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538809839, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728538809839, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7137712529124653, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7137712529124653}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728539966085, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728540021340, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728540021340, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7149044781941172, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7149044781941172}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728541177404, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728541233606, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728541233606, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7153092085349753, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7153092085349753}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542397120, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542452484, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728542452485, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.716667587340915, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.716667587340915}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543613320, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543669699, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728543669699, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7173634540126506, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7173634540126506}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544826341, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544881826, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728544881826, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7179233225148527, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7179233225148527}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546038641, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546093965, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728546093965, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7184311815844229, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7184311815844229}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728547260318, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728547316564, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728547316565, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7191096605050328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7191096605050328}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548476862, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548532277, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728548532277, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7192467427854418, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7192467427854418}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549694358, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549750718, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728549750718, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7199938913341333, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7199938913341333}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550912201, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550968747, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550968748, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7203293324374981, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.7203293324374981}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550968748, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2999040}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550968748, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550968748, "event_type": "POINT_IN_TIME", "key": "seed", "value": 31643, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550982004, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550982018, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_red", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550982018, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550982018, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550982018, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550982200, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728550982201, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552594185, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552604676, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619008, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619008, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619008, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619009, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619009, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619009, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619009, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619009, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619009, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619009, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619010, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619010, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619010, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619011, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619011, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619011, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552619011, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728552666986, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728553875969, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728553939951, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728553939951, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38616175677830683, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38616175677830683}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555092364, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555150488, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728555150489, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.41162710727584095, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.41162710727584095}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556296541, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556355574, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728556355575, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4350904176781545, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.4350904176781545}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557502466, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557561747, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728557561747, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.496310165579904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.496310165579904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558708887, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558766886, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728558766887, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5802412135699729, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.5802412135699729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559914092, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559973260, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728559973260, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6652080704154694, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.6652080704154694}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561120077, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561179197, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728561179198, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6984256211339748, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.6984256211339748}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562325103, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562383110, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728562383111, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7061839626088569, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7061839626088569}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563529512, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563588342, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728563588343, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.709852535744663, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.709852535744663}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564732742, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564791651, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728564791651, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7124425528931918, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7124425528931918}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728565936303, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728565995377, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728565995377, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7139212561175718, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7139212561175718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567148853, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567207007, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728567207007, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7147917833311085, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7147917833311085}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568352291, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568410261, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728568410261, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7158374547529306, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7158374547529306}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728569560993, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728569619018, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728569619018, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7164395152271045, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7164395152271045}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570770470, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570828476, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728570828476, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7171282240496328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7171282240496328}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728571971989, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728572031038, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728572031039, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7176245095920047, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7176245095920047}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573181122, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573239069, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728573239069, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7185501086189852, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7185501086189852}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574384118, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574443334, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728574443334, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.718467390029532, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.718467390029532}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728575608940, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728575667042, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728575667042, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7193740987105504, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7193740987105504}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728576812654, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728576871686, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728576871686, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.719547293968521, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.719547293968521}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578016561, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3148992, "step_num": 47712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578075504, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3148992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3148992, "step_num": 47712, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728578075504, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7198685481652716, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3148992, "masked_lm_accuracy": 0.7198685481652716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579221384, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 3298944, "step_num": 49984}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579280495, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 3298944, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 3298944, "step_num": 49984, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579280495, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7202844063393284, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 3298944, "masked_lm_accuracy": 0.7202844063393284}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579280496, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 3298944, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 3298944}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579280496, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579280496, "event_type": "POINT_IN_TIME", "key": "seed", "value": 26715, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579292347, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579292360, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_red", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579292360, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579292360, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579292360, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579292510, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728579292511, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580879014, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580889187, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903804, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903804, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903805, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903805, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903805, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903805, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903805, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903805, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903805, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903806, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903806, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903806, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903806, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903806, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903806, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903806, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580903806, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728580951866, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728582174949, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728582235954, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728582235955, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38839849547204247, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38839849547204247}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728583404398, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728583457118, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728583457118, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4043779520660943, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.4043779520660943}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584623300, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584677358, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728584677358, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4277538998833515, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.4277538998833515}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585841710, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585894585, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728585894586, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4895906483404781, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.4895906483404781}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728587058762, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728587112509, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728587112509, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5868821954505488, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.5868821954505488}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728588276137, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728588329834, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728588329834, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6855756070131875, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.6855756070131875}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589494361, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589548276, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728589548276, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7039273525328428, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7039273525328428}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590710884, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590765567, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728590765567, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7093820230075536, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7093820230075536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591929060, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591981842, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728591981842, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7118489585669369, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7118489585669369}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593146668, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593199377, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728593199377, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7138080239009914, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7138080239009914}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594362906, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594416691, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728594416692, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7149828011287352, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7149828011287352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595585602, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595639450, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728595639450, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7161310530023511, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7161310530023511}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596808968, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596861749, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728596861749, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7167342547606621, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7167342547606621}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598025777, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598079566, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728598079567, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7175075857669347, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7175075857669347}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599242962, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599297649, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728599297649, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7177893112502416, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7177893112502416}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600461272, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600514019, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728600514019, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7186980957604484, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7186980957604484}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601688118, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601741703, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728601741703, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7194635579882086, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7194635579882086}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728602912396, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728602965140, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728602965140, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7196329377980453, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7196329377980453}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604140305, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604193177, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604193177, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7201142786646146, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7201142786646146}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604193178, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2849088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604193178, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604193178, "event_type": "POINT_IN_TIME", "key": "seed", "value": 24659, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604206238, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604206251, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_red", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604206251, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604206251, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604206251, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604206399, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728604206400, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605831206, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605841697, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856169, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856169, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856170, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856170, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856170, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856170, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856170, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856170, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856170, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856171, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856171, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856171, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856171, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856171, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856171, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856171, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605856171, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728605907083, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728607116687, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728607176173, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728607176173, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38733550816792245, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38733550816792245}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728608331645, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728608385445, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728608385445, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.4099236127138853, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.4099236127138853}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609536865, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609589476, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728609589476, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.46445941542463526, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.46445941542463526}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610742733, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610796400, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728610796401, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5356849022231992, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.5356849022231992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728611950463, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728612003989, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728612003989, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6243599510936588, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.6243599510936588}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728613157626, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728613211058, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728613211058, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6915194793740074, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.6915194793740074}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728614363023, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728614416397, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728614416397, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.70565997331387, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.70565997331387}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728615568690, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728615622127, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728615622128, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7094783287385873, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7094783287385873}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728616773489, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728616825919, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728616825919, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7119873171805191, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7119873171805191}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728617978563, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618032221, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728618032222, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7142333673658525, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7142333673658525}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619183815, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619236305, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728619236305, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7149768588638763, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7149768588638763}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728620386747, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728620439998, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728620439998, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7156523679928931, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7156523679928931}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621597193, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621650622, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728621650622, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7164913090174971, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7164913090174971}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622809144, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622861570, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728622861570, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7172874884828523, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7172874884828523}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728624015271, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728624067817, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728624067818, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7180004538213985, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7180004538213985}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625221988, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625275277, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728625275277, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7182580689577264, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7182580689577264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626428374, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2549184, "step_num": 38624}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626481696, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2549184, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2549184, "step_num": 38624, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728626481696, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7189949285361891, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2549184, "masked_lm_accuracy": 0.7189949285361891}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627644056, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2699136, "step_num": 40896}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627696455, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2699136, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2699136, "step_num": 40896, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728627696456, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7192161206220823, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2699136, "masked_lm_accuracy": 0.7192161206220823}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628864498, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2849088, "step_num": 43168}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628917907, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2849088, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2849088, "step_num": 43168, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728628917908, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7198127043697744, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2849088, "masked_lm_accuracy": 0.7198127043697744}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630073687, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2999040, "step_num": 45440}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630126070, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2999040, "step_num": 45440, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630126070, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7204812415431342, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2999040, "masked_lm_accuracy": 0.7204812415431342}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630126070, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2999040, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2999040}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630126071, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630126071, "event_type": "POINT_IN_TIME", "key": "seed", "value": 6018, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630138587, "event_type": "POINT_IN_TIME", "key": "submission_org", "value": "tinycorp", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 631}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630138600, "event_type": "POINT_IN_TIME", "key": "submission_platform", "value": "tinybox_red", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630138600, "event_type": "POINT_IN_TIME", "key": "submission_division", "value": "closed", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 633}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630138601, "event_type": "POINT_IN_TIME", "key": "submission_status", "value": "onprem", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 634}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630138601, "event_type": "POINT_IN_TIME", "key": "submission_benchmark", "value": "bert", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 636}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630138750, "event_type": "POINT_IN_TIME", "key": "cache_clear", "value": true, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 639}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728630138750, "event_type": "INTERVAL_START", "key": "init_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 640}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631762258, "event_type": "POINT_IN_TIME", "key": "init_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 842}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631772243, "event_type": "INTERVAL_START", "key": "run_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 643}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787279, "event_type": "POINT_IN_TIME", "key": "global_batch_size", "value": 66, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 711}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787280, "event_type": "POINT_IN_TIME", "key": "max_sequence_length", "value": 512, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787280, "event_type": "POINT_IN_TIME", "key": "max_predictions_per_seq", "value": 76, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 713}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787280, "event_type": "POINT_IN_TIME", "key": "opt_name", "value": "LAMB", "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 715}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787280, "event_type": "POINT_IN_TIME", "key": "opt_base_learning_rate", "value": 0.0001, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 716}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787280, "event_type": "POINT_IN_TIME", "key": "opt_lamb_weight_decay_rate", "value": 0.01, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 717}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787280, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_1", "value": 0.9, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 718}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787281, "event_type": "POINT_IN_TIME", "key": "opt_lamb_beta_2", "value": 0.999, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 719}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787281, "event_type": "POINT_IN_TIME", "key": "opt_lamb_learning_rate_decay_poly_power", "value": 1.0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787281, "event_type": "POINT_IN_TIME", "key": "opt_lamb_epsilon", "value": 1e-06, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 721}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787281, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 723}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787281, "event_type": "POINT_IN_TIME", "key": "num_warmup_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 724}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787281, "event_type": "POINT_IN_TIME", "key": "start_warmup_step", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 725}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787281, "event_type": "POINT_IN_TIME", "key": "opt_learning_rate_training_steps", "value": 55000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 726}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787282, "event_type": "POINT_IN_TIME", "key": "gradient_accumulation_steps", "value": 1, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 727}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787282, "event_type": "POINT_IN_TIME", "key": "eval_samples", "value": 10002, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 728}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631787282, "event_type": "POINT_IN_TIME", "key": "train_samples", "value": 3630000, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 729}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728631833698, "event_type": "INTERVAL_START", "key": "epoch_start", "value": 0, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 753, "epoch_num": 0}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728633040032, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 149952, "step_num": 2272}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728633099704, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 149952, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 149952, "step_num": 2272, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728633099705, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.38797098084452913, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 149952, "masked_lm_accuracy": 0.38797098084452913}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634252081, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 299904, "step_num": 4544}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634305117, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 299904, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 299904, "step_num": 4544, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728634305117, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.3995994811617263, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 299904, "masked_lm_accuracy": 0.3995994811617263}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728635455137, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 449856, "step_num": 6816}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728635508121, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 449856, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 449856, "step_num": 6816, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728635508121, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.5011176564375941, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 449856, "masked_lm_accuracy": 0.5011176564375941}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728636656616, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 599808, "step_num": 9088}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728636710601, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 599808, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 599808, "step_num": 9088, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728636710602, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.6374410459147146, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 599808, "masked_lm_accuracy": 0.6374410459147146}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728637859253, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 749760, "step_num": 11360}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728637913116, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 749760, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 749760, "step_num": 11360, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728637913117, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7006531824018688, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 749760, "masked_lm_accuracy": 0.7006531824018688}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728639062400, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 899712, "step_num": 13632}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728639116398, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 899712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 899712, "step_num": 13632, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728639116398, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7092244053358937, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 899712, "masked_lm_accuracy": 0.7092244053358937}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728640264599, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1049664, "step_num": 15904}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728640317583, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1049664, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1049664, "step_num": 15904, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728640317584, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7131378053546167, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1049664, "masked_lm_accuracy": 0.7131378053546167}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728641465346, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1199616, "step_num": 18176}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728641518225, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1199616, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1199616, "step_num": 18176, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728641518225, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7143681931080901, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1199616, "masked_lm_accuracy": 0.7143681931080901}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728642666024, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1349568, "step_num": 20448}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728642718905, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1349568, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1349568, "step_num": 20448, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728642718905, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7157575550305322, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1349568, "masked_lm_accuracy": 0.7157575550305322}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728643864313, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1499520, "step_num": 22720}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728643917070, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1499520, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1499520, "step_num": 22720, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728643917070, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7172654897564532, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1499520, "masked_lm_accuracy": 0.7172654897564532}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728645063069, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1649472, "step_num": 24992}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728645115906, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1649472, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1649472, "step_num": 24992, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728645115907, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7175817649094158, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1649472, "masked_lm_accuracy": 0.7175817649094158}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728646261029, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1799424, "step_num": 27264}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728646314945, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1799424, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1799424, "step_num": 27264, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728646314946, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7180203909851078, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1799424, "masked_lm_accuracy": 0.7180203909851078}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728647468431, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 1949376, "step_num": 29536}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728647522632, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 1949376, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 1949376, "step_num": 29536, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728647522633, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7191875515115712, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 1949376, "masked_lm_accuracy": 0.7191875515115712}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728648686121, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2099328, "step_num": 31808}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728648739069, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2099328, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2099328, "step_num": 31808, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728648739069, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7196067409309428, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2099328, "masked_lm_accuracy": 0.7196067409309428}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728649885357, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2249280, "step_num": 34080}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728649939244, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2249280, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2249280, "step_num": 34080, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728649939245, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7197489482454004, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2249280, "masked_lm_accuracy": 0.7197489482454004}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728651085252, "event_type": "INTERVAL_START", "key": "eval_start", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 806, "epoch_num": 2399232, "step_num": 36352}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728651139304, "event_type": "INTERVAL_END", "key": "eval_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 861, "epoch_count": 2399232, "step_num": 36352, "samples_count": 10002}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728651139304, "event_type": "POINT_IN_TIME", "key": "eval_accuracy", "value": 0.7202936197442785, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 862, "epoch_num": 2399232, "masked_lm_accuracy": 0.7202936197442785}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728651139305, "event_type": "POINT_IN_TIME", "key": "epoch_stop", "value": 2399232, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 880, "epoch_num": 2399232}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728651139305, "event_type": "INTERVAL_END", "key": "run_stop", "value": null, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 881, "status": "success"}}
|
||||
:::MLLOG {"namespace": "", "time_ms": 1728651139305, "event_type": "POINT_IN_TIME", "key": "seed", "value": 32021, "metadata": {"file": "tinygrad/examples/mlperf/model_train.py", "lineno": 882}}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PYTHONPATH="." AMD=1
|
||||
export MODEL="bert"
|
||||
export DEFAULT_FLOAT="HALF" GPUS=1 BS=128 EVAL_BS=128
|
||||
|
||||
export BEAM=3 BEAM_UOPS_MAX=4000 BEAM_UPCAST_MAX=256 BEAM_LOCAL_MAX=1024 BEAM_MIN_PROGRESS=5
|
||||
export IGNORE_JIT_FIRST_BEAM=1
|
||||
# export BEAM_LOG_SURPASS_MAX=1
|
||||
# export BASEDIR="/raid/datasets/wiki"
|
||||
|
||||
export RESET_STEP=1
|
||||
export BENCHMARK=10 BERT_LAYERS=2 DEBUG=2
|
||||
|
||||
python3 examples/mlperf/model_train.py
|
||||
-69
@@ -1,69 +0,0 @@
|
||||
# 1. Problem
|
||||
|
||||
This problem uses BERT for NLP.
|
||||
|
||||
## Requirements
|
||||
|
||||
Install tinygrad and mlperf-logging (uncomment mlperf from setup.py) from branch mlperf_training_v5.0.
|
||||
```
|
||||
git clone https://github.com/tinygrad/tinygrad.git
|
||||
python3 -m pip install -e ".[mlperf]"
|
||||
```
|
||||
Also install gdown (for dataset), numpy, tqdm and tensorflow.
|
||||
```
|
||||
pip install gdown numpy tqdm tensorflow
|
||||
```
|
||||
|
||||
### tinybox_green
|
||||
Install the p2p driver per [README](https://github.com/tinygrad/open-gpu-kernel-modules/blob/550.54.15-p2p/README.md)
|
||||
This is the default on production tinybox green.
|
||||
|
||||
# 2. Directions
|
||||
|
||||
## Steps to download and verify data
|
||||
|
||||
### 1. Download raw data
|
||||
|
||||
```
|
||||
BASEDIR="/raid/datasets/wiki" WIKI_TRAIN=1 VERIFY_CHECKSUM=1 python3 extra/datasets/wikipedia_download.py
|
||||
```
|
||||
|
||||
### 2. Preprocess train and validation data
|
||||
|
||||
Note: The number of threads used for preprocessing is limited by available memory. With 128GB of RAM, a maximum of 16 threads is recommended.
|
||||
|
||||
#### Training:
|
||||
```
|
||||
BASEDIR="/raid/datasets/wiki" NUM_WORKERS=16 python3 extra/datasets/wikipedia.py pre-train all
|
||||
```
|
||||
|
||||
Generating a specific topic (Between 0 and 499)
|
||||
```
|
||||
BASEDIR="/raid/datasets/wiki" python3 extra/datasets/wikipedia.py pre-train 42
|
||||
```
|
||||
|
||||
#### Validation:
|
||||
```
|
||||
BASEDIR="/raid/datasets/wiki" python3 extra/datasets/wikipedia.py pre-eval
|
||||
```
|
||||
## Running
|
||||
|
||||
### tinybox_green
|
||||
|
||||
#### Steps to run benchmark
|
||||
```
|
||||
examples/mlperf/training_submission_v5.0/tinycorp/benchmarks/bert/implementations/tinybox_green/run_and_time.sh
|
||||
```
|
||||
|
||||
### tinybox_red
|
||||
|
||||
#### Steps to run benchmark
|
||||
```
|
||||
examples/mlperf/training_submission_v5.0/tinycorp/benchmarks/bert/implementations/tinybox_red/run_and_time.sh
|
||||
```
|
||||
### tinybox_8xMI300X
|
||||
|
||||
#### Steps to run benchmark
|
||||
```
|
||||
examples/mlperf/training_submission_v5.0/tinycorp/benchmarks/bert/implementations/tinybox_8xMI300X/run_and_time.sh
|
||||
```
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PYTHONPATH="." AMD=1
|
||||
export MODEL="bert"
|
||||
export DEFAULT_FLOAT="HALF" GPUS=8 BS=1024 EVAL_BS=1024
|
||||
export OPT_BASE_LEARNING_RATE=0.0011 OPT_LAMB_BETA_1=0.60466 OPT_LAMB_BETA_2=0.85437 DECAY=0.1
|
||||
|
||||
export BEAM=3 BEAM_UOPS_MAX=6000 BEAM_UPCAST_MAX=256 BEAM_LOCAL_MAX=1024 BEAM_MIN_PROGRESS=5
|
||||
export IGNORE_JIT_FIRST_BEAM=1 FREE_INTERMEDIATE=0
|
||||
export BASEDIR="/raid/datasets/wiki"
|
||||
|
||||
export BENCHMARK=10 BERT_LAYERS=2 DEBUG=2
|
||||
|
||||
python3 examples/mlperf/model_train.py
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PYTHONPATH="." AMD=1
|
||||
export MODEL="bert"
|
||||
export DEFAULT_FLOAT="HALF" GPUS=8 BS=1024 EVAL_BS=1024
|
||||
|
||||
# similar to https://github.com/mlcommons/training_results_v3.1/blob/d06288b2bd675a9d88e0e6181f5bb5626b71ec19/Quanta_Cloud_Technology/results/D54U-3U/bert/result_1.txt#L54
|
||||
export OPT_BASE_LEARNING_RATE=0.0011 OPT_LAMB_BETA_1=0.60466 OPT_LAMB_BETA_2=0.85437 DECAY=0.1
|
||||
export TRAIN_STEPS=3900
|
||||
|
||||
export BEAM=3 BEAM_UOPS_MAX=6000 BEAM_UPCAST_MAX=256 BEAM_LOCAL_MAX=1024 BEAM_MIN_PROGRESS=5
|
||||
export IGNORE_JIT_FIRST_BEAM=1 FREE_INTERMEDIATE=0
|
||||
export BASEDIR="/raid/datasets/wiki"
|
||||
|
||||
export WANDB=1 PARALLEL=0
|
||||
|
||||
RUNMLPERF=1 python3 examples/mlperf/model_train.py
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e # Exit on any error
|
||||
|
||||
export PYTHONPATH="." AMD=1
|
||||
export MODEL="bert"
|
||||
export SUBMISSION_PLATFORM="tinybox_8xMI300X"
|
||||
export DEFAULT_FLOAT="HALF" GPUS=8 BS=1024 EVAL_BS=1024
|
||||
|
||||
# similar to https://github.com/mlcommons/training_results_v3.1/blob/d06288b2bd675a9d88e0e6181f5bb5626b71ec19/Quanta_Cloud_Technology/results/D54U-3U/bert/result_1.txt#L54
|
||||
export OPT_BASE_LEARNING_RATE=0.0011 OPT_LAMB_BETA_1=0.60466 OPT_LAMB_BETA_2=0.85437 DECAY=0.1
|
||||
export TRAIN_STEPS=3900
|
||||
|
||||
export BEAM=3 BEAM_UOPS_MAX=6000 BEAM_UPCAST_MAX=256 BEAM_LOCAL_MAX=1024 BEAM_MIN_PROGRESS=5
|
||||
export IGNORE_JIT_FIRST_BEAM=1 FREE_INTERMEDIATE=0
|
||||
export BASEDIR="/raid/datasets/wiki"
|
||||
|
||||
# pip install -e ".[mlperf]"
|
||||
export LOGMLPERF=1
|
||||
|
||||
export SEED=$RANDOM
|
||||
DATETIME=$(date "+%m%d%H%M")
|
||||
LOGFILE="bert_8xMI300x_${DATETIME}_${SEED}.log"
|
||||
|
||||
# init # TODO: without DEBUG=2 it hangs
|
||||
BENCHMARK=10 INITMLPERF=1 BERT_LAYERS=2 DEBUG=2 python3 examples/mlperf/model_train.py | tee $LOGFILE
|
||||
|
||||
# run
|
||||
PARALLEL=0 RUNMLPERF=1 python3 examples/mlperf/model_train.py | tee -a $LOGFILE
|
||||
-69
@@ -1,69 +0,0 @@
|
||||
# 1. Problem
|
||||
|
||||
This problem uses BERT for NLP.
|
||||
|
||||
## Requirements
|
||||
|
||||
Install tinygrad and mlperf-logging (uncomment mlperf from setup.py) from branch mlperf_training_v5.0.
|
||||
```
|
||||
git clone https://github.com/tinygrad/tinygrad.git
|
||||
python3 -m pip install -e ".[mlperf]"
|
||||
```
|
||||
Also install gdown (for dataset), numpy, tqdm and tensorflow.
|
||||
```
|
||||
pip install gdown numpy tqdm tensorflow
|
||||
```
|
||||
|
||||
### tinybox_green
|
||||
Install the p2p driver per [README](https://github.com/tinygrad/open-gpu-kernel-modules/blob/550.54.15-p2p/README.md)
|
||||
This is the default on production tinybox green.
|
||||
|
||||
# 2. Directions
|
||||
|
||||
## Steps to download and verify data
|
||||
|
||||
### 1. Download raw data
|
||||
|
||||
```
|
||||
BASEDIR="/raid/datasets/wiki" WIKI_TRAIN=1 VERIFY_CHECKSUM=1 python3 extra/datasets/wikipedia_download.py
|
||||
```
|
||||
|
||||
### 2. Preprocess train and validation data
|
||||
|
||||
Note: The number of threads used for preprocessing is limited by available memory. With 128GB of RAM, a maximum of 16 threads is recommended.
|
||||
|
||||
#### Training:
|
||||
```
|
||||
BASEDIR="/raid/datasets/wiki" NUM_WORKERS=16 python3 extra/datasets/wikipedia.py pre-train all
|
||||
```
|
||||
|
||||
Generating a specific topic (Between 0 and 499)
|
||||
```
|
||||
BASEDIR="/raid/datasets/wiki" python3 extra/datasets/wikipedia.py pre-train 42
|
||||
```
|
||||
|
||||
#### Validation:
|
||||
```
|
||||
BASEDIR="/raid/datasets/wiki" python3 extra/datasets/wikipedia.py pre-eval
|
||||
```
|
||||
## Running
|
||||
|
||||
### tinybox_green
|
||||
|
||||
#### Steps to run benchmark
|
||||
```
|
||||
examples/mlperf/training_submission_v5.0/tinycorp/benchmarks/bert/implementations/tinybox_green/run_and_time.sh
|
||||
```
|
||||
|
||||
### tinybox_red
|
||||
|
||||
#### Steps to run benchmark
|
||||
```
|
||||
examples/mlperf/training_submission_v5.0/tinycorp/benchmarks/bert/implementations/tinybox_red/run_and_time.sh
|
||||
```
|
||||
### tinybox_8xMI300X
|
||||
|
||||
#### Steps to run benchmark
|
||||
```
|
||||
examples/mlperf/training_submission_v5.0/tinycorp/benchmarks/bert/implementations/tinybox_8xMI300X/run_and_time.sh
|
||||
```
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user