Skip to content

Instantly share code, notes, and snippets.

@mjaric
mjaric / get_memory_size.py
Created January 16, 2025 15:15 — forked from philschmid/get_memory_size.py
Get needed GPU per precision for a Hugging Face Model Id
from typing import Dict, Union
from huggingface_hub import get_safetensors_metadata
import argparse
import sys
# Example:
# python get_gpu_memory.py Qwen/Qwen2.5-7B-Instruct
# Dictionary mapping dtype strings to their byte sizes
bytes_per_dtype: Dict[str, float] = {
@mjaric
mjaric / Setting-up-Windows-WSL.md
Created September 19, 2019 08:18 — forked from roustem/Setting-up-Windows-WSL1.md
Setting-up-Windows-WSL
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<title>Test fullscreen</title>
<style>
html, body {
margin: 0;
padding: 0;