Skip to content

Instantly share code, notes, and snippets.

@mtisz
mtisz / convert.py
Created March 21, 2024 18:58 — 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"