Skip to content

Instantly share code, notes, and snippets.

View teleprint-me's full-sized avatar

Austin teleprint-me

View GitHub Profile
@teleprint-me
teleprint-me / convert.py
Created March 24, 2024 04:36 — forked from chu-tianxiang/convert.py
Convert grok-1 weight to torch
import numpy as np
import torch
import jax
from tqdm import tqdm
from model import LanguageModelConfig, TransformerConfig, QuantizedWeight8bit as QW8Bit
from runners import InferenceRunner, ModelRunner, sample_from_model
CKPT_PATH = "./checkpoints"