Skip to content

Instantly share code, notes, and snippets.

View Stone-dielianhua's full-sized avatar
💭
I may be slow to respond.

Mr Stone Stone-dielianhua

💭
I may be slow to respond.
View GitHub Profile
@Stella2211
Stella2211 / mem_eff_fp8_convert.py
Last active March 27, 2025 06:03
メモリ効率のいいfp8化スクリプト。 / Memory efficient fp8 conversion script.
import json
from pathlib import Path
import torch
from tqdm import tqdm
import struct
from typing import Dict, Any
import sys
# input file
if(len(sys.argv) < 3):