Install packages:
pip install open-webui mlx-lm
Start Open WebUI server:
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis. | |
## Core Principles | |
1. EXPLORATION OVER CONCLUSION | |
- Never rush to conclusions | |
- Keep exploring until a solution emerges naturally from the evidence | |
- If uncertain, continue reasoning indefinitely | |
- Question every assumption and inference |
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 |
def generate_speculative( | |
model: nn.Module, | |
draft_model: nn.Module, | |
tokenizer: Union[PreTrainedTokenizer, TokenizerWrapper], | |
prompt: str, | |
max_tokens: int = 100, | |
verbose: bool = False, | |
formatter: Optional[Callable] = None, | |
**kwargs, |
import numpy as np | |
import mlx.core as mx | |
import matplotlib.pyplot as plt | |
from matplotlib.animation import FuncAnimation | |
import tqdm | |
def conway(a: mx.array): | |
source = """ |