Skip to content

Instantly share code, notes, and snippets.

@op06072
op06072 / mlx_chatbot.py
Last active December 23, 2023 15:46
chatbot with llm using mlx
import time
import json
import argparse
from pathlib import Path
from dataclasses import dataclass
from typing import Optional, Tuple
from os.path import abspath, expanduser
from sentencepiece import SentencePieceProcessor
import mlx.core as mx
import math
import time
from threading import Thread
import multiprocessing as mp
import extrainterpreters as ei
from multiprocessing.dummy import Pool as ThreadPool
def mandelbrot(c, max_iterations=100):
z = 0