Skip to content

Instantly share code, notes, and snippets.

Avatar

Zachary Mueller muellerzr

View GitHub Profile
@muellerzr
muellerzr / scratchpad.ipynb
Last active May 9, 2023 09:10
Intel XPU issue T4 Colab
View scratchpad.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@muellerzr
muellerzr / checkpointing.py
Created May 9, 2023 09:05
Checkpointing script to test cuda device
View checkpointing.py
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@muellerzr
muellerzr / scratchpad.ipynb
Created February 13, 2023 21:02
Big Model Memory Leak
View scratchpad.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@muellerzr
muellerzr / boundaries.md
Last active February 23, 2023 01:01
Tweets I'm saving
View boundaries.md

By Janine Sickmeyer

One of the best things I've learned in therapy is how to establish and enforce strong boundaries.

Protect your time:

• if it’s not a hell yes!, it’s a no. • take breaks to come back stronger • slow down to find clarity of purpose • you don’t NEED a reason to say no

@muellerzr
muellerzr / xla_scriptv2.py
Last active November 8, 2022 02:04
Second version
View xla_scriptv2.py
import torch_xla.distributed.xla_multiprocessing as xmp
import torch_xla.core.xla_model as xm
def _mp_fn(index):
print("I did something!")
xm.rendezvous('checking_out')
if __name__ == "__main__":
xmp.spawn(_mp_fn, args=(), nprocs=8)
View xla_script.py
import torch_xla.core.xla_model as xm
import torch_xla.core.xla_env_vars as xenv
import os
def main(args=None):
print("I did something!")
if os.getenv(xenv.HOST_WORLD_SIZE, None) and xm.xrt_world_size() > 1:
xm.rendezvous("checking_out")
if __name__ == "__main__":
@muellerzr
muellerzr / train_test_discrepancy.ipynb
Created June 22, 2022 02:06
Testing the Train/Test Time Discrepancy
View train_test_discrepancy.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View XLA_TEST_SCRIPT.py
#!/usr/bin/env python
# Copyright 2021 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@muellerzr
muellerzr / memory_issue.ipynb
Created June 10, 2022 18:40
Colab memory issue
View memory_issue.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@muellerzr
muellerzr / lr_find_issue.ipynb
Last active May 19, 2022 21:27
Issue with LR Finder
View lr_find_issue.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.