Skip to content

Instantly share code, notes, and snippets.

View MicPie's full-sized avatar

Michael Pieler MicPie

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MicPie
MicPie / csv2jsonl.py
Created October 9, 2022 18:22
ISP csv to jsonl script
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",
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):
{
"_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,