This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
// To debug a Rust dylib (tiktoken) from a Pyton script: | |
// - Launch the Python script with the Python debugger and stop at a breakpoint. | |
// - Get the process id (for example, `os.getpid()`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple Llama resharding | |
# Tested on Llama 3.1 70B only | |
# Shards are released from memory as soon as we're done with each | |
import torch | |
from pathlib import Path | |
checkpoint = Path("original") | |
output_dir = Path("resharded") | |
output_dir.mkdir(parents=True, exist_ok=True) |
OlderNewer