This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>DeSepAI Image</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.7.1/jszip.min.js"></script> | |
<style> | |
body { margin:0; padding:1rem; background:#121212; color:#e0e0e0; font-family:sans-serif; display:flex; justify-content:center; } | |
.container { background:#1e1e1e; padding:1.5rem; border-radius:6px; width:100%; max-width:800px; position:relative; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\conda\envs\bd3lm\python.exe -u main.py loader.eval_batch_size=16 model=small algo=bd3lm algo.backbone=hf_dit data=openwebtext-split data.insert_valid_special=False model.length=1024 model.attn_backend=sdpa block_size=4 eval.checkpoint_path=kuleshov-group/bd3lm-owt-block_size4 wandb=null mode=ppl_eval strategy=single_device | |
bd3lm on windows, perplexity | |
Validation DataLoader 0: 100%|█████████████████████████████████████████████████| 6891/6891 [1:54:19<00:00, 1.00it/s] | |
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ | |
┃ Validate metric ┃ DataLoader 0 ┃ | |
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ | |
│ sampling_eps_max │ 1.0 │ | |
│ sampling_eps_min │ 0.0010000000474974513 │ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import subprocess | |
import sys | |
import os | |
from pathlib import Path | |
import configparser | |
import re | |
from packaging.requirements import Requirement, InvalidRequirement | |
from packaging.version import parse as parse_version, InvalidVersion | |
from packaging.specifiers import SpecifierSet, InvalidSpecifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conda env list --json | python -c "import json,sys,subprocess as sp; from pathlib import Path; envs=json.load(sys.stdin)['envs']; [print(e, 'HAS cv2+mediapipe' if sp.run([str(Path(e, 'python.exe')), '-c', 'import cv2, mediapipe'], stdout=sp.DEVNULL, stderr=sp.DEVNULL).returncode==0 else 'DOES NOT') for e in envs]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
This script demonstrates how to load a quantized Flux.1-dev model (4-bit, NF4) | |
using bitsandbytes with Diffusers and then apply a LoRA adapter. | |
It loads: | |
(a) the T5EncoderModel from the "text_encoder_2" subfolder in 4-bit mode, and | |
(b) the FluxTransformer2DModel from the "transformer" subfolder in 4-bit mode. | |
Then it instantiates a FluxPipeline with device_map="balanced" and applies LoRA. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from datasets import load_dataset, Dataset | |
# Load and prep dataset | |
SYSTEM_PROMPT = """ | |
Respond in the following format: | |
<reasoning> | |
... | |
</reasoning> | |
<answer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){function r(){return Math.floor(300*Math.random()+300)}function l(c){if("undefined"==typeof jQuery){var e=document.createElement("script");e.src="https://code.jquery.com/jquery-3.6.0.min.js";e.onload=function(){n("%E2%9C%85%20jQuery%20loaded");c&&c()};document.head.appendChild(e)}else{n("%E2%9C%85%20jQuery%20present");c&&c()}}function u(){if(!document.getElementById("s-status")){var e=document.createElement("div");e.id="s-status";e.style.cssText="position:fixed;bottom:10px;right:10px;padding:10px;background:#000;color:#fff;font-size:14px;border-radius:5px;opacity:.9;z-index:9999;max-width:300px";e.innerHTML='<strong>Shun%20Status:</strong><div%20id="s-log"></div>';document.body.appendChild(e)}}function n(e){u();var c=document.getElementById("s-log");c&&(c.innerHTML+=e+"<br>",clearTimeout(window.sTimeout),window.sTimeout=setTimeout(function(){c.innerHTML=""},1e4))}function t(){var e=$('[data-testid^="feedItem-by-"]');e.length?(e.each(function(){$(this).find(".s-btn").length||$(this).appen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using static System.Net.Mime.MediaTypeNames; | |
using System.Diagnostics; | |
/// <summary> | |
/// Loads and plays a GIF, assigning each frame to the material’s '_DepthTex' texture. | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Phase 1: Data Preprocessing & Label Refinement | |
#1. Scraping Audio from YouTube | |
from yt_dlp import YoutubeDL | |
# Download audio from YouTube | |
def download_audio(url, output_dir="audio"): | |
ydl_opts = { | |
'format': 'bestaudio/best', | |
'postprocessors': [{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
public static class StripUtility | |
{ | |
// 1) Remove specified vertices | |
// 2) Re-sort remaining verts by angle around the centroid | |
// Ensures a consistent winding for a triangle strip after removal | |
public static void RemoveAndReorder(ref List<Vector3> verts, List<int> indicesToRemove) | |
{ |
NewerOlder