🌲 Invert a binary tree! 🌲
Except with 3 catches:
- It must invert the keys ("bit-reversal permutation")
- It must be a dependency-free, pure recursive function
- It must have type
Bit -> Tree -> Tree
(i.e., a direct recursion with max 1 bit state)
import argparse | |
import json | |
import logging | |
import os | |
import re | |
import shutil | |
from concurrent.futures import ProcessPoolExecutor, as_completed | |
from dataclasses import dataclass | |
from datetime import datetime | |
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple |
#!/bin/bash | |
# Function to display usage information | |
usage() { | |
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]" | |
exit 1 | |
} | |
# Check if at least one argument (input file) is provided | |
if [ $# -lt 1 ]; then |
""" | |
pip install outlines torch==2.4.0 transformers accelerate typing-extensions pillow pdf2image rich requests | |
may need to install tkinter: https://stackoverflow.com/questions/25905540/importerror-no-module-named-tkinter | |
sudo apt-get install poppler-utils | |
""" | |
from enum import Enum | |
from io import BytesIO |
import asyncio | |
import base64 | |
import json | |
import os | |
import pyaudio | |
import shutil | |
import websockets | |
class AudioStreamer: |
Begin by enclosing all thoughts within <thinking> tags, exploring multiple angles and approaches. | |
Break down the solution into clear steps within <step> tags. Start with a 20-step budget, requesting more for complex problems if needed. | |
Use <count> tags after each step to show the remaining budget. Stop when reaching 0. | |
Continuously adjust your reasoning based on intermediate results and reflections, adapting your strategy as you progress. | |
Regularly evaluate progress using <reflection> tags. Be critical and honest about your reasoning process. | |
Assign a quality score between 0.0 and 1.0 using <reward> tags after each reflection. Use this to guide your approach: | |
0.8+: Continue current approach | |
0.5-0.7: Consider minor adjustments | |
Below 0.5: Seriously consider backtracking and trying a different approach |
# The vast majority of this code was written by Mistral-large and | |
# is therefore public domain in the United States. | |
# But just in case, this script is public domain as set out in the | |
# Creative Commons Zero 1.0 Universal Public Domain Notice | |
# https://creativecommons.org/publicdomain/zero/1.0/ | |
import argparse | |
import json | |
from datetime import datetime | |
import html |
See rune2e.sh
for info on how to run the experiment.
""" | |
The 2024 Transformer (the Noam Transformer): | |
- RMSNorm | |
- GQA or some combination | |
- Sliding window attention | |
- Swiglu | |
- RoPE (Rotary Positional Embedding) | |
LLM Arches: | |
hidden | MLP mult. | n_layers | rope_theta | GQA Group Size | GLU Act. | ops |