You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
source$(python -c "import oneccl_bindings_for_pytorch as torch_ccl;print(torch_ccl.cwd)")/env/setvars.sh
49
51
```
50
52
51
53
#### 2. Launch ray cluster
@@ -64,18 +66,23 @@ If deploying a ray cluster on multiple nodes, please download the workflow repos
64
66
65
67
#### 1. Prepare Dataset
66
68
67
-
Now, the workflow only supports datasets in the specified format
68
-
69
-
The format of dataset similar to [databricks/databricks-dolly-15k](https://huggingface.co/datasets/databricks/databricks-dolly-15k). This type of data is used for finetuning in prompt mode and this type of data is characterized by containing `instruction``context` and `response` fields where `instruction` and `response` are required fields and `context` is an optional field. In the data preprocessing stage, the three fields will be concatenated to the corresponding format according to [dolly](https://github.com/databrickslabs/dolly/blob/master/training/trainer.py#LL93).
69
+
The workflow only supports datasets with JSONL (JSON Lines) format, where each line is a separate JSON object. Here’s the structure each line should follow:
+ Instruction Column: The column in the dataset is the user input, such as a question or a command.
74
-
+ Context Column: This column is other information used by instruction, such as the options used in the question and so on. It can be empty.
75
-
+ Response: The column in the dataset containing the expected output.
75
+
- Instruction: This is the user's input, such as a question, command, or prompt for content generation.
76
+
- Context: Supplementary information that aids the instruction. This can include previous conversation parts, background details, or specificities influencing the response. It's optional and can be left empty.
77
+
- Response: The model's expected output in response to the 'instruction', considering the 'context' if provided.
76
78
79
+
##### Examples:
80
+
```json
81
+
{"instruction":"Which is a species of fish? Tope or Rope", "context":"", "response":"Tope"}
82
+
{"instruction":"What is the average lifespan of a Golden Retriever?","context":"Golden Retrievers are a generally healthy breed; they have an average lifespan of 12 to 13 years. Irresponsible breeding to meet high demand has led to the prevalence of inherited health problems in some breed lines, including allergic skin conditions, eye problems and sometimes snappiness. These problems are rarely encountered in dogs bred from responsible breeders.","response":"The average lifespan of a Golden Retriever is 12 to 13 years."}
83
+
```
77
84
78
-
Therefore, if the your data meets the above two formats, you can use the data by configuring the local data path or huggingface dataset. If not, please refer to the following **Adopt to Your Dataset**.
85
+
An example dataset can be accessed at `examples/data/sample_finetune_data.jsonl`. Ensure each line in your dataset follows the above format.
79
86
80
87
#### 2. Finetune
81
88
@@ -147,15 +154,16 @@ A specific model can be deployed by specifying the model path and tokenizer path
147
154
# If you dont' want to view serve logs, you can set env var, "KEEP_SERVE_TERMINAL" to false
148
155
149
156
# Run model serve with specified model and tokenizer
# INFO - Deployment 'custom-model_PredictDeployment' is ready at `http://127.0.0.1:8000/custom-model`. component=serve deployment=custom-model_PredictDeployment
Otherwise, all the models configured in `inference/config.py` will be deployed by default. If you want to choose a specific model to deploy, you can set env var, "MODEL_TO_SERVE", to your choice. You can add customized models in it as needed.
165
+
Otherwise, all the models placed under `inference/models` folder will be deployed by default. If you want to choose a specific model to deploy, you can set env var, "MODEL_TO_SERVE", to your choice. You can also specify your model by either `--model` or `--config_file`.
166
+
For `--config_file`, you can copy one of them from `inference/models` and make necessary changes.
159
167
160
168
Llm-ray also supports serving with deepspeed. Please follow the [guide](inference/deepspeed/README.md) under inference/deepspeed folder.
0 commit comments