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
The LLM Roleplay (roleplay) codebase is built upon the [UrarTU framework](https://github.com/tamohannes/urartu). For detailed insights into its structure, please refer to the [Getting Started Guide](https://github.com/tamohannes/urartu/blob/master/getting_started.md).
21
+
The LLM Roleplay (roleplay) codebase is built upon the [UrarTU framework](https://github.com/tamohannes/urartu) (version 2). For detailed insights into its structure, please refer to the [Getting Started Guide](https://github.com/tamohannes/urartu/blob/master/getting_started.md).
22
22
23
23
## Installation
24
24
Getting started with roleplay is a breeze! 💨 Just follow these steps to set up the necessary packages and create a local package called `roleplay`:
25
25
26
-
- Clone the repository: `git clone [email protected]:tamohannes/llm_roleplay.git`
26
+
- Clone the repository: `git clone [email protected]:UKPLab/roleplay.git`
27
27
- Navigate to the project directory: `cd roleplay`
28
28
- Execute the magic command: `pip install .`
29
29
30
+
🪄 After running the previous command, `roleplay` will install the required packages including the latest version of `urartu` (>=2.0) and make it ready to use.
31
+
Plus, an alias will be created, allowing you to access roleplay from any directory on your operating system effortlessly:
30
32
31
-
Adding a touch of convenience! 🪄 After running the previous command, `roleplay` will be set up and ready to use. Plus, an alias will be created, allowing you to access roleplay from any directory on your operating system effortlessly:
33
+
```bash
34
+
urartu --help
35
+
```
32
36
37
+
Now, to register `roleplay` under the corresponding name in `urartu` we need to run the following command by providing the path where the module is located, for more info refere to [UrarTU's documentation](https://pypi.org/project/urartu/):
> For an enhanced experience with the Slurm job cancellation process, it is recommended to utilize a specific fork of the `submitit` package available at: [https://github.com/tamohannes/submitit](https://github.com/tamohannes/submitit). This fork includes the `ResumableSlurmJob.on_job_fail` callback, which allows the incorporation of additional functionality within this callback to ensure a graceful job termination. -->
41
+
42
+
After this you can run `urartu -h` again to see the available modules under `launch` command and make sure that `roleplay` is present there.
38
43
39
44
40
45
@@ -63,12 +68,12 @@ aim up
63
68
Let's get started with generating dialogues using the `roleplay` action. The process is simple: just provide the name of the configuration file containing the action, followed by the action name itself. For the `roleplay` action, we'll initiate it by using the Mistral 8x7B model as the inquirer. 🎇
The `action_config` parameter specifies which configuration file to use to run the action. Afterward, we define the configuration file for the inquirer using the `model_inquirer` argument and set the configuration for the responder with the `model_responder` argument.
70
75
71
-
To execute the command on a Slurm cluster, configure the `roleplay/config/main.yaml` file with the corresponding fields, and then use the same command to run the job. For more details on how to edit the configuration files, please refer to the upcoming sections.
76
+
To execute the command on a Slurm cluster, modify the `roleplay/configs/action_config/generate_dialogues.yaml` file with the corresponding fields, and then use the same command to run the job. For more details on how to edit the configuration files, please refer to the upcoming sections.
72
77
73
78
> **Huggingface Authentication**
74
79
> You might need to log in to HuggingFace to authenticate your use of Mistral 8x7B. To do this, use the `huggingface-cli` login command and provide your access token.
@@ -77,35 +82,37 @@ To execute the command on a Slurm cluster, configure the `roleplay/config/main.y
77
82
78
83
## Configs: Tailoring Your Setup
79
84
80
-
The default configs which shape the way of configs are defined under `roleplay/config` directory:
81
-
-`roleplay/config/main.yaml`: This core configuration file sets the foundation for default settings, covering all available keys within the system.
82
-
-`roleplay/config/action_config` Directory: A designated space for specific action configurations.
85
+
The default configs which shape the way of configs are defined in `urartu` under `urartu/config` directory:
86
+
-`urartu/config/main.yaml`: This core configuration file sets the foundation for default settings, covering all available keys within the system.
87
+
-`urartu/config/action_config` Directory: A designated space for specific action configurations.
88
+
For more see the structure of [UrarTU](https://github.com/tamohannes/urartu).
83
89
84
90
### Crafting Customizations
85
91
86
92
You have two flexible options for tailoring your configurations in `roleplay`.
87
93
88
-
1.**Custom Config Files**: To simplify configuration adjustments, `roleplay` provides a dedicated `configs` directory where you can store personalized configuration files. These files seamlessly integrate with Hydra's search path. The directory structure mirrors that of `roleplay/config`. You can define project-specific configurations in specially named files. For instance, the `roleplay.yaml` file within the `configs` directory can house all the configurations specific to your `roleplay` project, with customized settings.
94
+
1.**Custom Config Files**: To simplify configuration adjustments, `roleplay` provides a dedicated `configs` directory where you can store personalized configuration files. These files seamlessly integrate with Hydra's search path. The directory structure mirrors that of `urartu/config`. You can define project-specific configurations in specially named files.
95
+
The `generate_dialogues.yaml` file within the `configs` directory houses all the configurations specific to our `roleplay` project, with customized settings.
89
96
90
97
- **Personalized User Configs**: To further tailor configurations for individual users, create a directory named `configs_{username}` at the same level as the `configs` directory, where `{username}` represents your operating system username (check out `configs_tamoyan` for an example). The beauty of this approach is that there are no additional steps required. Your customizations will smoothly load and override the default configurations, ensuring a seamless and hassle-free experience. ✨
91
98
92
-
The order of precedence for configuration overrides is as follows: `roleplay/config`, `configs`, `configs_{username}`, giving priority to user-specific configurations.
99
+
The order of precedence for configuration overrides is as follows: `urartu/config`, `roleplay/configs`, `roleplay/configs_{username}`, giving priority to user-specific configurations.
93
100
94
-
2.**CLI Approach**: For those who prefer a command-line interface (CLI) approach, `roleplay` offers a convenient method. You can enhance your commands with specific key-value pairs directly in the CLI. For example, modifying your working directory path is as simple as:
101
+
2.**CLI Approach**: For those who prefer a command-line interface (CLI) approach, `urartu` offers a convenient method. You can enhance your commands with specific key-value pairs directly in the CLI. For example, modifying your working directory path is as simple as:
Choose the method that suits your workflow best and enjoy the flexibility `roleplay` provides for crafting custom configurations.
107
+
Choose the method that suits your workflow best and enjoy the flexibility `urartu` provides for crafting custom configurations.
101
108
102
109
103
110
### Effortless Launch
104
111
105
-
With `roleplay`, launching actions is incredibly easy, offering you two options. 🚀
112
+
With `urartu`, launching actions is incredibly easy, offering you two options. 🚀
106
113
107
114
- **Local Marvel:** This option allows you to run jobs on your local machine, right where the script is executed.
108
-
- **Cluster Voyage:** This choice takes you on a journey to the Slurm cluster. By adjusting the `slurm.use_slurm` setting in`config/main.yaml`, you can easily switch between local and cluster execution.
115
+
- **Cluster Voyage:** This choice takes you on a journey to the Slurm cluster. By adjusting the `slurm.use_slurm` setting in`roleplay/configs/action_config/generate_dialogues.yaml`, you can easily switch between local and cluster execution.
109
116
110
117
Enjoy the flexibility to choose the launch adventure that best suits your needs and goals!
0 commit comments