chore: scaffold buddhagpt, verify Qwen2.5-7B-4bit runs on M5 (PAI-87)
This commit is contained in:
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
data/
|
||||
corpus/raw/
|
||||
models/
|
||||
.venv/
|
||||
__pycache__/
|
||||
*.jsonl
|
||||
adapters/
|
||||
1
.python-version
Normal file
1
.python-version
Normal file
@@ -0,0 +1 @@
|
||||
3.12
|
||||
28
pyproject.toml
Normal file
28
pyproject.toml
Normal 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",
|
||||
]
|
||||
8
scripts/smoke_generate.py
Normal file
8
scripts/smoke_generate.py
Normal 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))
|
||||
7
src/buddhagpt/__init__.py
Normal file
7
src/buddhagpt/__init__.py
Normal 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!")
|
||||
Reference in New Issue
Block a user