google-tunix 0.0.2__tar.gz → 0.1.0.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/PKG-INFO +32 -4
  2. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/README.md +25 -2
  3. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/google_tunix.egg-info/PKG-INFO +32 -4
  4. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/google_tunix.egg-info/SOURCES.txt +7 -3
  5. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/google_tunix.egg-info/requires.txt +8 -1
  6. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/pyproject.toml +9 -2
  7. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/__init__.py +18 -0
  8. google_tunix-0.1.0.dev0/tunix/cli/config.py +705 -0
  9. google_tunix-0.1.0.dev0/tunix/cli/grpo_main.py +130 -0
  10. google_tunix-0.1.0.dev0/tunix/cli/peft_main.py +89 -0
  11. google_tunix-0.0.2/tunix/sft/peft_main.py → google_tunix-0.1.0.dev0/tunix/cli/utils/model.py +214 -144
  12. google_tunix-0.1.0.dev0/tunix/cli/utils/reward.py +130 -0
  13. google_tunix-0.1.0.dev0/tunix/examples/data/math_dataset.py +80 -0
  14. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/examples/data/translation_dataset.py +6 -98
  15. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/generate/tokenizer_adapter.py +79 -3
  16. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/generate/utils.py +2 -10
  17. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/gemma/params_safetensors.py +1 -1
  18. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/gemma/sampler.py +1 -1
  19. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/common.py +4 -40
  20. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/grpo/grpo_learner.py +73 -61
  21. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/ppo/ppo_learner.py +14 -12
  22. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/rl_cluster.py +118 -20
  23. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/rl_learner.py +69 -97
  24. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/rollout/vanilla_rollout.py +11 -0
  25. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/trainer.py +1 -1
  26. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/utils.py +19 -85
  27. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/sft/dpo/dpo_trainer.py +10 -5
  28. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/sft/metrics_logger.py +2 -0
  29. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/sft/peft_trainer.py +21 -12
  30. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/sft/progress_bar.py +3 -1
  31. google_tunix-0.1.0.dev0/tunix/sft/utils.py +166 -0
  32. google_tunix-0.0.2/tunix/sft/config.py +0 -389
  33. google_tunix-0.0.2/tunix/sft/utils.py +0 -40
  34. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/LICENSE +0 -0
  35. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/google_tunix.egg-info/dependency_links.txt +0 -0
  36. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/google_tunix.egg-info/top_level.txt +0 -0
  37. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/setup.cfg +0 -0
  38. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/__init__.py +0 -0
  39. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/distillation_trainer.py +0 -0
  40. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/feature_extraction/__init__.py +0 -0
  41. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/feature_extraction/pooling.py +0 -0
  42. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/feature_extraction/projection.py +0 -0
  43. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/feature_extraction/sowed_module.py +0 -0
  44. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/strategies/__init__.py +0 -0
  45. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/strategies/attention.py +0 -0
  46. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/strategies/base_strategy.py +0 -0
  47. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/strategies/feature_pooling.py +0 -0
  48. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/strategies/feature_projection.py +0 -0
  49. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/distillation/strategies/logit.py +0 -0
  50. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/generate/base_sampler.py +0 -0
  51. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/generate/beam_search.py +0 -0
  52. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/generate/sampler.py +0 -0
  53. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/generate/vllm_sampler.py +0 -0
  54. /google_tunix-0.0.2/tunix/models/gemma/gemma.py → /google_tunix-0.1.0.dev0/tunix/models/gemma/model.py +0 -0
  55. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/gemma/params.py +0 -0
  56. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/gemma3/model.py +0 -0
  57. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/gemma3/params.py +0 -0
  58. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/gemma3/params_safetensors.py +0 -0
  59. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/llama3/model.py +0 -0
  60. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/llama3/params.py +0 -0
  61. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/qwen2/model.py +0 -0
  62. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/qwen2/params.py +0 -0
  63. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/qwen3/model.py +0 -0
  64. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/qwen3/params.py +0 -0
  65. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/models/safetensors_loader.py +0 -0
  66. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/oss/utils.py +0 -0
  67. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/agents/agent_types.py +0 -0
  68. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/agents/base_agent.py +0 -0
  69. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/agents/tool_agent.py +0 -0
  70. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/environments/base_environment.py +0 -0
  71. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/environments/tool_environment.py +0 -0
  72. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/parser/tool_parser/gemini_parser.py +0 -0
  73. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/parser/tool_parser/qwen_parser.py +0 -0
  74. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/parser/tool_parser/tool_parser_base.py +0 -0
  75. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/parser/tool_parser/tool_parser_registry.py +0 -0
  76. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/prompts/prompt_template.py +0 -0
  77. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/rewards/reward.py +0 -0
  78. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/rewards/reward_types.py +0 -0
  79. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/tools/base_tool.py +0 -0
  80. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/tools/calculator_tool.py +0 -0
  81. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/tools/tool_manager.py +0 -0
  82. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/experimental/agentic/trajectory/trajectory_collect_engine.py +0 -0
  83. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/grpo/grpo_helpers.py +0 -0
  84. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/inference/inference_worker.py +0 -0
  85. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/ppo/ppo_helpers.py +0 -0
  86. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/queue/data_queue.py +0 -0
  87. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/reshard.py +0 -0
  88. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/rollout/base_rollout.py +0 -0
  89. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/rl/rollout/vllm_rollout.py +0 -0
  90. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/sft/checkpoint_manager.py +0 -0
  91. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/sft/hooks.py +0 -0
  92. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/sft/inflight_throttler.py +0 -0
  93. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/sft/profiler.py +0 -0
  94. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/sft/sharding_utils.py +0 -0
  95. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/sft/system_metrics_calculator.py +0 -0
  96. {google_tunix-0.0.2 → google_tunix-0.1.0.dev0}/tunix/tests/test_common.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-tunix
3
- Version: 0.0.2
3
+ Version: 0.1.0.dev0
4
4
  Summary: A lightweight JAX-native LLM post-training framework.
5
5
  Author-email: Tunix Developers <tunix-dev@google.com>
6
6
  License-Expression: Apache-2.0
@@ -16,7 +16,7 @@ Requires-Python: >=3.11
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: datasets
19
- Requires-Dist: flax
19
+ Requires-Dist: gcsfs
20
20
  Requires-Dist: grain
21
21
  Requires-Dist: huggingface_hub
22
22
  Requires-Dist: jax
@@ -30,6 +30,7 @@ Requires-Dist: tensorboardX
30
30
  Requires-Dist: tensorflow_datasets
31
31
  Requires-Dist: tqdm
32
32
  Requires-Dist: transformers
33
+ Requires-Dist: python-dotenv
33
34
  Provides-Extra: docs
34
35
  Requires-Dist: sphinx>=8.2.3; extra == "docs"
35
36
  Requires-Dist: sphinx-book-theme>=1.1.4; extra == "docs"
@@ -40,6 +41,10 @@ Requires-Dist: matplotlib>=3.10.0; extra == "docs"
40
41
  Requires-Dist: sphinx-gallery>=0.19.0; extra == "docs"
41
42
  Requires-Dist: sphinx-collections>=0.0.1; extra == "docs"
42
43
  Requires-Dist: sphinx_contributors; extra == "docs"
44
+ Provides-Extra: prod
45
+ Requires-Dist: flax>=0.12.0; extra == "prod"
46
+ Provides-Extra: dev
47
+ Requires-Dist: flax>=0.11.2; extra == "dev"
43
48
  Dynamic: license-file
44
49
 
45
50
  # Tunix: A JAX-native LLM Post-Training Library
@@ -106,13 +111,30 @@ Tunix is still under development, here's a glimpse of the current features:
106
111
 
107
112
  ## Installation
108
113
 
109
- Tunix doesn't have a PyPI package yet. To use Tunix, you need to install from
110
- GitHub directly.
114
+ You can install Tunix in several ways:
115
+
116
+ 1. From PyPI (recommended):
117
+
118
+ ```sh
119
+ pip install "tunix[prod]"
120
+ ```
121
+
122
+ 2. Directly from GitHub (latest main branch)
111
123
 
112
124
  ```sh
113
125
  pip install git+https://github.com/google/tunix
114
126
  ```
115
127
 
128
+ 3. From source (editable install) If you plan to modify the codebase and run it
129
+ in development mode:
130
+
131
+ ```sh
132
+ git clone https://github.com/google/tunix.git
133
+ cd tunix
134
+ pip install -e ".[dev]"
135
+
136
+ ```
137
+
116
138
  ## Getting Started
117
139
 
118
140
  To get started, we have a bunch of detailed examples and tutorials.
@@ -155,3 +177,9 @@ cutting-edge research and easy reproducibility.
155
177
  Thank you for your interest in Tunix. We're working hard to bring you a powerful
156
178
  and efficient library for LLM post-training. Please follow our progress and
157
179
  check back for updates!
180
+
181
+ ## Acknowledgements
182
+
183
+ Thank you to all our wonderful contributors!
184
+
185
+ [![Contributors](https://contrib.rocks/image?repo=google/tunix)](https://github.com/google/tunix/graphs/contributors)
@@ -62,13 +62,30 @@ Tunix is still under development, here's a glimpse of the current features:
62
62
 
63
63
  ## Installation
64
64
 
65
- Tunix doesn't have a PyPI package yet. To use Tunix, you need to install from
66
- GitHub directly.
65
+ You can install Tunix in several ways:
66
+
67
+ 1. From PyPI (recommended):
68
+
69
+ ```sh
70
+ pip install "tunix[prod]"
71
+ ```
72
+
73
+ 2. Directly from GitHub (latest main branch)
67
74
 
68
75
  ```sh
69
76
  pip install git+https://github.com/google/tunix
70
77
  ```
71
78
 
79
+ 3. From source (editable install) If you plan to modify the codebase and run it
80
+ in development mode:
81
+
82
+ ```sh
83
+ git clone https://github.com/google/tunix.git
84
+ cd tunix
85
+ pip install -e ".[dev]"
86
+
87
+ ```
88
+
72
89
  ## Getting Started
73
90
 
74
91
  To get started, we have a bunch of detailed examples and tutorials.
@@ -111,3 +128,9 @@ cutting-edge research and easy reproducibility.
111
128
  Thank you for your interest in Tunix. We're working hard to bring you a powerful
112
129
  and efficient library for LLM post-training. Please follow our progress and
113
130
  check back for updates!
131
+
132
+ ## Acknowledgements
133
+
134
+ Thank you to all our wonderful contributors!
135
+
136
+ [![Contributors](https://contrib.rocks/image?repo=google/tunix)](https://github.com/google/tunix/graphs/contributors)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: google-tunix
3
- Version: 0.0.2
3
+ Version: 0.1.0.dev0
4
4
  Summary: A lightweight JAX-native LLM post-training framework.
5
5
  Author-email: Tunix Developers <tunix-dev@google.com>
6
6
  License-Expression: Apache-2.0
@@ -16,7 +16,7 @@ Requires-Python: >=3.11
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: datasets
19
- Requires-Dist: flax
19
+ Requires-Dist: gcsfs
20
20
  Requires-Dist: grain
21
21
  Requires-Dist: huggingface_hub
22
22
  Requires-Dist: jax
@@ -30,6 +30,7 @@ Requires-Dist: tensorboardX
30
30
  Requires-Dist: tensorflow_datasets
31
31
  Requires-Dist: tqdm
32
32
  Requires-Dist: transformers
33
+ Requires-Dist: python-dotenv
33
34
  Provides-Extra: docs
34
35
  Requires-Dist: sphinx>=8.2.3; extra == "docs"
35
36
  Requires-Dist: sphinx-book-theme>=1.1.4; extra == "docs"
@@ -40,6 +41,10 @@ Requires-Dist: matplotlib>=3.10.0; extra == "docs"
40
41
  Requires-Dist: sphinx-gallery>=0.19.0; extra == "docs"
41
42
  Requires-Dist: sphinx-collections>=0.0.1; extra == "docs"
42
43
  Requires-Dist: sphinx_contributors; extra == "docs"
44
+ Provides-Extra: prod
45
+ Requires-Dist: flax>=0.12.0; extra == "prod"
46
+ Provides-Extra: dev
47
+ Requires-Dist: flax>=0.11.2; extra == "dev"
43
48
  Dynamic: license-file
44
49
 
45
50
  # Tunix: A JAX-native LLM Post-Training Library
@@ -106,13 +111,30 @@ Tunix is still under development, here's a glimpse of the current features:
106
111
 
107
112
  ## Installation
108
113
 
109
- Tunix doesn't have a PyPI package yet. To use Tunix, you need to install from
110
- GitHub directly.
114
+ You can install Tunix in several ways:
115
+
116
+ 1. From PyPI (recommended):
117
+
118
+ ```sh
119
+ pip install "tunix[prod]"
120
+ ```
121
+
122
+ 2. Directly from GitHub (latest main branch)
111
123
 
112
124
  ```sh
113
125
  pip install git+https://github.com/google/tunix
114
126
  ```
115
127
 
128
+ 3. From source (editable install) If you plan to modify the codebase and run it
129
+ in development mode:
130
+
131
+ ```sh
132
+ git clone https://github.com/google/tunix.git
133
+ cd tunix
134
+ pip install -e ".[dev]"
135
+
136
+ ```
137
+
116
138
  ## Getting Started
117
139
 
118
140
  To get started, we have a bunch of detailed examples and tutorials.
@@ -155,3 +177,9 @@ cutting-edge research and easy reproducibility.
155
177
  Thank you for your interest in Tunix. We're working hard to bring you a powerful
156
178
  and efficient library for LLM post-training. Please follow our progress and
157
179
  check back for updates!
180
+
181
+ ## Acknowledgements
182
+
183
+ Thank you to all our wonderful contributors!
184
+
185
+ [![Contributors](https://contrib.rocks/image?repo=google/tunix)](https://github.com/google/tunix/graphs/contributors)
@@ -7,6 +7,11 @@ google_tunix.egg-info/dependency_links.txt
7
7
  google_tunix.egg-info/requires.txt
8
8
  google_tunix.egg-info/top_level.txt
9
9
  tunix/__init__.py
10
+ tunix/cli/config.py
11
+ tunix/cli/grpo_main.py
12
+ tunix/cli/peft_main.py
13
+ tunix/cli/utils/model.py
14
+ tunix/cli/utils/reward.py
10
15
  tunix/distillation/__init__.py
11
16
  tunix/distillation/distillation_trainer.py
12
17
  tunix/distillation/feature_extraction/__init__.py
@@ -19,6 +24,7 @@ tunix/distillation/strategies/base_strategy.py
19
24
  tunix/distillation/strategies/feature_pooling.py
20
25
  tunix/distillation/strategies/feature_projection.py
21
26
  tunix/distillation/strategies/logit.py
27
+ tunix/examples/data/math_dataset.py
22
28
  tunix/examples/data/translation_dataset.py
23
29
  tunix/generate/base_sampler.py
24
30
  tunix/generate/beam_search.py
@@ -27,7 +33,7 @@ tunix/generate/tokenizer_adapter.py
27
33
  tunix/generate/utils.py
28
34
  tunix/generate/vllm_sampler.py
29
35
  tunix/models/safetensors_loader.py
30
- tunix/models/gemma/gemma.py
36
+ tunix/models/gemma/model.py
31
37
  tunix/models/gemma/params.py
32
38
  tunix/models/gemma/params_safetensors.py
33
39
  tunix/models/gemma/sampler.py
@@ -73,11 +79,9 @@ tunix/rl/rollout/base_rollout.py
73
79
  tunix/rl/rollout/vanilla_rollout.py
74
80
  tunix/rl/rollout/vllm_rollout.py
75
81
  tunix/sft/checkpoint_manager.py
76
- tunix/sft/config.py
77
82
  tunix/sft/hooks.py
78
83
  tunix/sft/inflight_throttler.py
79
84
  tunix/sft/metrics_logger.py
80
- tunix/sft/peft_main.py
81
85
  tunix/sft/peft_trainer.py
82
86
  tunix/sft/profiler.py
83
87
  tunix/sft/progress_bar.py
@@ -1,5 +1,5 @@
1
1
  datasets
2
- flax
2
+ gcsfs
3
3
  grain
4
4
  huggingface_hub
5
5
  jax
@@ -13,6 +13,10 @@ tensorboardX
13
13
  tensorflow_datasets
14
14
  tqdm
15
15
  transformers
16
+ python-dotenv
17
+
18
+ [dev]
19
+ flax>=0.11.2
16
20
 
17
21
  [docs]
18
22
  sphinx>=8.2.3
@@ -24,3 +28,6 @@ matplotlib>=3.10.0
24
28
  sphinx-gallery>=0.19.0
25
29
  sphinx-collections>=0.0.1
26
30
  sphinx_contributors
31
+
32
+ [prod]
33
+ flax>=0.12.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "google-tunix"
3
- version = "0.0.2"
3
+ version = "0.1.0.dev0"
4
4
  authors = [
5
5
  { name = "Tunix Developers", email = "tunix-dev@google.com" },
6
6
  ]
@@ -19,7 +19,7 @@ classifiers = [
19
19
  ]
20
20
  dependencies = [
21
21
  "datasets",
22
- "flax",
22
+ "gcsfs",
23
23
  "grain",
24
24
  "huggingface_hub",
25
25
  "jax",
@@ -33,6 +33,7 @@ dependencies = [
33
33
  "tensorflow_datasets",
34
34
  "tqdm",
35
35
  "transformers",
36
+ "python-dotenv",
36
37
  ]
37
38
 
38
39
  [project.optional-dependencies]
@@ -47,6 +48,12 @@ docs = [
47
48
  "sphinx-collections>=0.0.1",
48
49
  "sphinx_contributors",
49
50
  ]
51
+ prod = [
52
+ "flax>=0.12.0",
53
+ ]
54
+ dev = [
55
+ "flax>=0.11.2",
56
+ ]
50
57
 
51
58
  [project.urls]
52
59
  Source = "https://github.com/google/tunix"
@@ -14,21 +14,39 @@
14
14
 
15
15
  """Tunix API."""
16
16
 
17
+ from importlib.metadata import PackageNotFoundError
18
+ from importlib.metadata import version
19
+
20
+ try:
21
+ __version__ = version("google-tunix") # match the name in pyproject.toml
22
+ except PackageNotFoundError:
23
+ __version__ = "0.0.0.dev0" # fallback for editable installs
24
+
25
+
17
26
  # pylint: disable=g-multiple-import, g-importing-member
18
27
 
19
28
  from tunix.distillation.distillation_trainer import DistillationTrainer
20
29
  from tunix.distillation.distillation_trainer import TrainingConfig as DistillationTrainingConfig
21
30
  from tunix.generate.sampler import CacheConfig
22
31
  from tunix.generate.sampler import Sampler
32
+ from tunix.rl.grpo.grpo_learner import GRPOConfig
23
33
  from tunix.rl.grpo.grpo_learner import GrpoConfig
34
+ from tunix.rl.grpo.grpo_learner import GRPOLearner
24
35
  from tunix.rl.grpo.grpo_learner import GrpoLearner
25
36
  from tunix.rl.grpo.grpo_learner import RewardFn
37
+ from tunix.rl.ppo.ppo_learner import PPOConfig
38
+ from tunix.rl.ppo.ppo_learner import PpoConfig
39
+ from tunix.rl.ppo.ppo_learner import PPOLearner
40
+ from tunix.rl.ppo.ppo_learner import PpoLearner
26
41
  from tunix.rl.rl_cluster import ClusterConfig
42
+ from tunix.rl.rl_cluster import MetricsBuffer
27
43
  from tunix.rl.rl_cluster import RLCluster
28
44
  from tunix.rl.rl_cluster import RLTrainingConfig
29
45
  from tunix.rl.rl_cluster import Role
30
46
  from tunix.rl.rollout.base_rollout import RolloutConfig
47
+ from tunix.sft.dpo.dpo_trainer import DPOTrainer
31
48
  from tunix.sft.dpo.dpo_trainer import DpoTrainer
49
+ from tunix.sft.dpo.dpo_trainer import DPOTrainingConfig
32
50
  from tunix.sft.dpo.dpo_trainer import DpoTrainingConfig
33
51
  from tunix.sft.metrics_logger import MetricsLogger
34
52
  from tunix.sft.metrics_logger import MetricsLoggerOptions