Skip to content

Commit

Permalink
modify documents
Browse files Browse the repository at this point in the history
  • Loading branch information
starmountain1997 committed Oct 14, 2024
1 parent 892ca4d commit 303a161
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 21 additions & 1 deletion docs/zh_cn/training/modify_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,31 @@ XTuner 使用 MMEngine 的「纯 Python 风格的配置文件」,直接利用
1. 修改 ``pretrained_model_name_or_path``\ ,其将应用至 ``model.llm`` 和 ``tokenizer`` 的初始化中。
#. 修改 ``prompt_template`` 以适配所选择的 LLM。

使用 ModelScope 模型?
使用本地 ModelScope 模型?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. 参考 `文档 <../preparation/pretrained_model.md>`__ 将其下载至本地
2. 修改\ ``pretrained_model_name_or_path``\

使用在线 openMind 或 ModelScope 模型?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
可在配置文件中新增 ``model_resource`` 参数, ``args`` 用作可变参数(如下载私有模型需传入token的情况):

.. code:: python
# 从 openMind 下载
from openmind_hub import snapshot_download
# 或者从 ModelScope 下载(未经测试)
# from modelscope.hub.snapshot_download import snapshot_download
# Model
pretrained_model_name_or_path = 'Tianjin_Ascend/Qwen1.5-4B'
model_resource = {
"fn": snapshot_download,
"args":{
# "token":"xxxxxxxxxx"
}
}
微调类型
-------------

Expand Down
2 changes: 2 additions & 0 deletions docs/zh_cn/training/open_source_dataset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ XTuner 使用上游库 ``datasets`` 的统一载入接口 ``load_dataset``\ 。
``dataset=dict(type=load_dataset, path=data_path)`` 中的 ``path``
参数即可。

若想使用 openMind 数据集,可将 ``dataset=dict(type=load_dataset, path=data_path)`` 中的 ``type`` 替换为 ``openmind.OmDataset``。


字段格式
--------
Expand Down

0 comments on commit 303a161

Please sign in to comment.