Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import argparse | |
import pandas as pd | |
import json | |
def main(): | |
parser = argparse.ArgumentParser(description="List the content of a folder") | |
parser.add_argument( | |
"path", | |
metavar="path", |
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
import numpy as np | |
import torch | |
import pdb | |
def take_out(flat_params, shape): | |
return flat_params[:np.prod(shape)].view(*shape), flat_params[np.prod(shape):] | |
def get_slice(shard_size, shard_i): |
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
{ | |
"_name_or_path": "./", | |
"_remove_final_layer_norm": false, | |
"activation_dropout": 0.0, | |
"activation_function": "relu", | |
"architectures": [ | |
"OPTForCausalLM" | |
], | |
"attention_dropout": 0.0, | |
"bos_token_id": 2, |