mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-14 15:52:49 +08:00
[v1] add v1 folders (#9225)
This commit is contained in:
parent
a0d44c650a
commit
1d96c62df2
@ -25,12 +25,13 @@ USAGE = (
|
|||||||
+ "| Usage: |\n"
|
+ "| Usage: |\n"
|
||||||
+ "| llamafactory-cli api -h: launch an OpenAI-style API server |\n"
|
+ "| llamafactory-cli api -h: launch an OpenAI-style API server |\n"
|
||||||
+ "| llamafactory-cli chat -h: launch a chat interface in CLI |\n"
|
+ "| llamafactory-cli chat -h: launch a chat interface in CLI |\n"
|
||||||
+ "| llamafactory-cli eval -h: evaluate models |\n"
|
|
||||||
+ "| llamafactory-cli export -h: merge LoRA adapters and export model |\n"
|
+ "| llamafactory-cli export -h: merge LoRA adapters and export model |\n"
|
||||||
+ "| llamafactory-cli train -h: train models |\n"
|
+ "| llamafactory-cli train -h: train models |\n"
|
||||||
+ "| llamafactory-cli webchat -h: launch a chat interface in Web UI |\n"
|
+ "| llamafactory-cli webchat -h: launch a chat interface in Web UI |\n"
|
||||||
+ "| llamafactory-cli webui: launch LlamaBoard |\n"
|
+ "| llamafactory-cli webui: launch LlamaBoard |\n"
|
||||||
|
+ "| llamafactory-cli env: show environment info |\n"
|
||||||
+ "| llamafactory-cli version: show version info |\n"
|
+ "| llamafactory-cli version: show version info |\n"
|
||||||
|
+ "| Hint: You can use `lmf` as a shortcut for `llamafactory-cli`. |\n"
|
||||||
+ "-" * 70
|
+ "-" * 70
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -48,9 +49,7 @@ def _run_chat():
|
|||||||
|
|
||||||
|
|
||||||
def _run_eval():
|
def _run_eval():
|
||||||
from .eval.evaluator import run_eval
|
raise NotImplementedError("Evaluation will be deprecated in the future.")
|
||||||
|
|
||||||
return run_eval()
|
|
||||||
|
|
||||||
|
|
||||||
def _export_model():
|
def _export_model():
|
||||||
|
@ -15,6 +15,11 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
VERSION = "0.9.4.dev0"
|
||||||
|
|
||||||
|
|
||||||
|
def print_env() -> None:
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
@ -26,11 +31,6 @@ import transformers
|
|||||||
import trl
|
import trl
|
||||||
from transformers.utils import is_torch_cuda_available, is_torch_npu_available
|
from transformers.utils import is_torch_cuda_available, is_torch_npu_available
|
||||||
|
|
||||||
|
|
||||||
VERSION = "0.9.4.dev0"
|
|
||||||
|
|
||||||
|
|
||||||
def print_env() -> None:
|
|
||||||
info = {
|
info = {
|
||||||
"`llamafactory` version": VERSION,
|
"`llamafactory` version": VERSION,
|
||||||
"Platform": platform.platform(),
|
"Platform": platform.platform(),
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from llamafactory.train.tuner import run_exp # use absolute import
|
|
||||||
|
|
||||||
|
|
||||||
def launch():
|
def launch():
|
||||||
|
from llamafactory.train.tuner import run_exp # use absolute import
|
||||||
|
|
||||||
run_exp()
|
run_exp()
|
||||||
|
|
||||||
|
|
||||||
|
0
src/llamafactory/v1/__init__.py
Normal file
0
src/llamafactory/v1/__init__.py
Normal file
0
src/llamafactory/v1/core/__init__.py
Normal file
0
src/llamafactory/v1/core/__init__.py
Normal file
0
src/llamafactory/v1/core/base_trainer.py
Normal file
0
src/llamafactory/v1/core/base_trainer.py
Normal file
0
src/llamafactory/v1/core/chat_sampler.py
Normal file
0
src/llamafactory/v1/core/chat_sampler.py
Normal file
0
src/llamafactory/v1/core/data_loader.py
Normal file
0
src/llamafactory/v1/core/data_loader.py
Normal file
0
src/llamafactory/v1/core/model_engine.py
Normal file
0
src/llamafactory/v1/core/model_engine.py
Normal file
0
src/llamafactory/v1/launcher.py
Normal file
0
src/llamafactory/v1/launcher.py
Normal file
0
src/llamafactory/v1/plugins/__init__.py
Normal file
0
src/llamafactory/v1/plugins/__init__.py
Normal file
0
src/llamafactory/v1/plugins/model_plugins/peft.py
Normal file
0
src/llamafactory/v1/plugins/model_plugins/peft.py
Normal file
0
src/llamafactory/v1/plugins/sampler_plugins/vllm.py
Normal file
0
src/llamafactory/v1/plugins/sampler_plugins/vllm.py
Normal file
0
src/llamafactory/v1/trainers/__init__.py
Normal file
0
src/llamafactory/v1/trainers/__init__.py
Normal file
0
src/llamafactory/v1/trainers/dpo_trainer.py
Normal file
0
src/llamafactory/v1/trainers/dpo_trainer.py
Normal file
0
src/llamafactory/v1/trainers/rm_trainer.py
Normal file
0
src/llamafactory/v1/trainers/rm_trainer.py
Normal file
0
src/llamafactory/v1/trainers/sft_trainer.py
Normal file
0
src/llamafactory/v1/trainers/sft_trainer.py
Normal file
Loading…
x
Reference in New Issue
Block a user