mirror of
https://github.com/karpathy/nanochat.git
synced 2025-12-06 04:12:13 +00:00
Merge 3b372875c1 into 4a87a0d19f
This commit is contained in:
commit
72c0925c88
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,6 +1,7 @@
|
|||
.venv/
|
||||
__pycache__/
|
||||
*.pyc
|
||||
*.so
|
||||
rustbpe/target/
|
||||
dev-ignore/
|
||||
report.md
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class HuggingFaceTokenizer:
|
|||
# -----------------------------------------------------------------------------
|
||||
# Tokenizer based on rustbpe + tiktoken combo
|
||||
import pickle
|
||||
import rustbpe
|
||||
from nanochat import rustbpe
|
||||
import tiktoken
|
||||
|
||||
class RustBPETokenizer:
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ requires = ["maturin>=1.7,<2.0"]
|
|||
build-backend = "maturin"
|
||||
|
||||
[tool.maturin]
|
||||
module-name = "rustbpe"
|
||||
module-name = "nanochat.rustbpe"
|
||||
bindings = "pyo3"
|
||||
python-source = "."
|
||||
manifest-path = "rustbpe/Cargo.toml"
|
||||
|
|
@ -67,9 +67,15 @@ cpu = [
|
|||
gpu = [
|
||||
"torch>=2.8.0",
|
||||
]
|
||||
|
||||
[tool.uv]
|
||||
conflicts = [
|
||||
|
||||
[tool.uv]
|
||||
cache-keys = [
|
||||
{ file = "pyproject.toml" },
|
||||
{ file = "rustbpe/src/**/*.rs" },
|
||||
{ file = "rustbpe/Cargo.toml" },
|
||||
{ file = "rustbpe/Cargo.lock" }
|
||||
]
|
||||
conflicts = [
|
||||
[
|
||||
{ extra = "cpu" },
|
||||
{ extra = "gpu" },
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user