chore: scaffold buddhagpt, verify Qwen2.5-7B-4bit runs on M5 (PAI-87)

This commit is contained in:
marcuspaico
2026-08-14 17:01:33 -07:00
parent 4a5f2026c4
commit 76d1858ffe
7 changed files with 1638 additions and 0 deletions

7
.gitignore vendored Normal file
View File

@@ -0,0 +1,7 @@
data/
corpus/raw/
models/
.venv/
__pycache__/
*.jsonl
adapters/

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3.12

0
README.md Normal file
View File

28
pyproject.toml Normal file
View File

@@ -0,0 +1,28 @@
[project]
name = "buddhagpt"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "marcuspaico", email = "marcus@thepai.co" }
]
requires-python = ">=3.12"
dependencies = [
"anthropic>=0.122.0",
"lancedb>=0.37.1",
"mlx-lm>=0.31.3",
"pyyaml>=6.0.3",
"sentence-transformers>=5.7.0",
]
[project.scripts]
buddhagpt = "buddhagpt:main"
[build-system]
requires = ["uv_build>=0.10.11,<0.11.0"]
build-backend = "uv_build"
[dependency-groups]
dev = [
"pytest>=9.1.1",
]

View File

@@ -0,0 +1,8 @@
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/Qwen2.5-7B-Instruct-4bit")
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "What is the Second Noble Truth?"}],
tokenize=False, add_generation_prompt=True,
)
print(generate(model, tokenizer, prompt=prompt, max_tokens=200))

View File

@@ -0,0 +1,7 @@
"""BuddhaGPT: Fine-tune and RAG experiment with Buddhist texts."""
__version__ = "0.1.0"
def main() -> None:
print("Hello from buddhagpt!")

1587
uv.lock generated Normal file

File diff suppressed because it is too large Load Diff