Open source weights! (#97)
Some checks failed
Lint with Black / lint (push) Failing after 3s
Lint with isort / lint (push) Failing after 2s

Summary:

Add code to download weights and demo code for running model.

Weights at:
- https://huggingface.co/collections/facebook/blt-6801263d4ac1704702a192a6
- https://huggingface.co/facebook/blt
- https://huggingface.co/facebook/blt-1b
- https://huggingface.co/facebook/blt-7b

Test Plan:
This commit is contained in:
Pedro Rodriguez 2025-04-17 09:38:56 -07:00 committed by GitHub
parent e299427ae4
commit 96d51b59d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 98 additions and 12 deletions

View file

@ -25,7 +25,11 @@ from bytelatent.checkpoint import (
)
from bytelatent.config_parser import parse_args_to_pydantic_model
from bytelatent.data.file_util import get_fs
from bytelatent.distributed import get_global_rank, setup_torch_distributed, DistributedArgs
from bytelatent.distributed import (
DistributedArgs,
get_global_rank,
setup_torch_distributed,
)
from bytelatent.model.blt import ByteLatentTransformer
from bytelatent.tokenizers.abstract_tokenizer import Tokenizer
from bytelatent.transformer import LMTransformer
@ -388,10 +392,7 @@ class PackedCausalTransformerGenerator:
return generation, loglikelihood, greedy
def load_consolidated_model_and_tokenizer(
consolidated_path,
init_distributed=False
):
def load_consolidated_model_and_tokenizer(consolidated_path, init_distributed=False):
if init_distributed:
distributed_args = DistributedArgs()
distributed_args.configure_world()