Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
executable file
·103 lines (96 loc) · 3.65 KB
/
Copy pathpyproject.toml
File metadata and controls
executable file
·103 lines (96 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[project]
name = "liquid-finetune"
version = "0.1.0"
description = "A minimal fine-tuning repo for LFM2, fully built on Open Source."
readme = "README.md"
authors = [
{ name = "Liquid AI", email = "support@liquid.ai" }
]
requires-python = ">=3.12"
dependencies = [
"accelerate>=1.7.0",
"peft>=0.15.2",
"deepspeed>=0.17.1; sys_platform == 'linux'",
"torch>=2.10.0,<2.12.0",
"transformers>=5.3.0,<5.4.0",
"numpy>=2.4.1",
"trl==1.9.0",
"rich>=14.1.0",
"pillow>=11.3.0",
"mpi4py>=4.1.0; sys_platform == 'linux'",
"wandb>=0.22.3",
"ray==2.51.1",
"pyyaml>=6.0",
"turm>=0.13.0; sys_platform == 'linux'",
"torchvision>=0.24.1",
"modal>=0.73",
"trackio>=0.3",
"typer>=0.20.0",
"kubernetes>=34.0.0",
"pydantic>=2.0",
"bitsandbytes>=0.48.0; sys_platform == 'linux'",
"sentence-transformers>=6.0.0",
]
[project.optional-dependencies]
# OpenEnv RL environments — only needed if you use rl_env in your config.
# Install with: uv sync --extra rl-env
rl-env = [
"openenv-core>=0.1; sys_platform == 'linux'",
]
[project.scripts]
liquid-finetune = "liquid_finetune:main"
liquid-export-manual-sharded-checkpoint = "liquid_finetune.cli.export_manual_sharded_checkpoint:main"
liquid-export-gguf = "liquid_finetune.cli.export_gguf:main"
liquid-qat-matrix = "liquid_finetune.quantization.qat.matrix:main"
liquid-qat-report = "liquid_finetune.quantization.qat.report:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
# The default CUDA profile installs a pinned FA2 wheel. Model loading still
# probes the import at runtime and falls back to SDPA if FA2 is not usable.
no-build-isolation-package = ["flash-attn"]
default-groups = ["dev", "cuda", "flash-attn"]
environments = [
"python_version == '3.12' and sys_platform == 'darwin'",
"python_version == '3.12' and sys_platform == 'linux'",
]
# vLLM wheels can declare dependency ranges that lag the LFM Transformers /
# Hugging Face Hub stack. The override is intentional and covered by the GRPO
# smoke fixtures, which leave use_vllm enabled to match shipped defaults.
override-dependencies = [
# Override so vLLM resolves with the LFM-validated Transformers 5.3 stack.
"transformers>=5.3.0,<5.4.0",
"huggingface_hub>=1.0",
"numpy<2.5",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"configs: config parsing, validation, override, filtering (no GPU)",
"dense: dense model end-to-end training tests",
"vlm: VLM end-to-end training tests",
"moe: MoE end-to-end training tests",
"retrieval: embedding and ColBERT end-to-end training tests",
"evaluation: inference-backend and benchmark evaluation tests",
"single_gpu: local single-GPU end-to-end training tests",
"requires_multi_gpu: test requires at least two visible GPUs",
]
addopts = "-v --tb=short"
[dependency-groups]
cuda = [
"liger-kernel>=0.6.2; sys_platform == 'linux'",
# Keep CUDA vLLM pinned. FA2 is installed by default through the separate
# flash-attn group so it can be disabled with `--no-group flash-attn`.
"vllm==0.22.0; sys_platform == 'linux'",
]
dev = [
"pre-commit>=4.2.0",
"pytest>=8.0",
"ruff>=0.11.13",
]
flash-attn = [
# HF FA2 support for the default CUDA 13 / Torch 2.11 stack.
# Model loading still probes the import at runtime and falls back to SDPA.
"flash-attn @ https://github.com/adithyaxx/flash-attention/releases/download/v2.8.3/flash_attn-2.8.3%2Bcu13torch2.11cxx11abiTRUE-cp312-cp312-linux_x86_64.whl#sha256=eea423825f3e12818b98b2078e2cb5ce6fe6b73d22612316d2a55fad4701938f; python_version == '3.12' and sys_platform == 'linux' and platform_machine == 'x86_64'",
]