mirror of
https://github.com/facebookresearch/blt.git
synced 2025-09-09 13:54:37 +00:00
Open source weights! (#97)
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:
parent
e299427ae4
commit
96d51b59d2
7 changed files with 98 additions and 12 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue