Compare commits

...

2 Commits

Author SHA1 Message Date
Wing Lian
b7fe46579d make the conversations/messages field configurable for sharegpt 2024-03-08 08:08:29 -05:00
Wing Lian
638c2dafb5 JarvisLabs (#1372)
* add Jarvis cloud gpu and sponsorship

* whitespace
2024-03-07 10:47:32 -05:00
2 changed files with 16 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ Features:
- [Environment](#environment)
- [Docker](#docker)
- [Conda/Pip venv](#condapip-venv)
- [Cloud GPU](#cloud-gpu) - Latitude.sh, RunPod
- [Cloud GPU](#cloud-gpu) - Latitude.sh, JarvisLabs, RunPod
- [Bare Metal Cloud GPU](#bare-metal-cloud-gpu)
- [Windows](#windows)
- [Launching on public clouds via SkyPilot](#launching-on-public-clouds-via-skypilot)
@@ -199,6 +199,7 @@ docker run --privileged --gpus '"all"' --shm-size 10g --rm -it --name axolotl --
For cloud GPU providers that support docker images, use [`winglian/axolotl-cloud:main-latest`](https://hub.docker.com/r/winglian/axolotl-cloud/tags)
- on Latitude.sh use this [direct link](https://latitude.sh/blueprint/989e0e79-3bf6-41ea-a46b-1f246e309d5c)
- on JarvisLabs.ai use this [direct link](https://jarvislabs.ai/templates/axolotl)
- on RunPod use this [direct link](https://runpod.io/gsc?template=v2ickqhz9s&ref=6i7fkpdz)
#### Bare Metal Cloud GPU
@@ -1298,4 +1299,6 @@ consider sponsoring the project via [GitHub Sponsors](https://github.com/sponsor
#### 🥉 Bronze Sponsors - $500/mo
- [JarvisLabs.ai](https://jarvislabs.ai)
---

View File

@@ -39,6 +39,8 @@ def load(tokenizer, cfg, ds_cfg: Optional[Dict[str, Any]] = None):
)
if ds_cfg and "strict" in ds_cfg:
strategy.strict = ds_cfg["strict"]
if ds_cfg and "field_messages" in ds_cfg:
strategy.field_messages = ds_cfg["field_messages"]
return strategy
@@ -83,6 +85,7 @@ class SimpleShareGPTPromptTokenizingStrategy(ShareGPTPromptTokenizingStrategy):
"""
_strict = False
_field_messages = "conversations"
@property
def strict(self):
@@ -92,8 +95,16 @@ class SimpleShareGPTPromptTokenizingStrategy(ShareGPTPromptTokenizingStrategy):
def strict(self, strict):
self._strict = strict
@property
def field_messages(self):
return self._strict
@field_messages.setter
def field_messages(self, field_messages):
self._field_messages = field_messages
def get_conversation_thread(self, prompt):
conversations = prompt["conversations"]
conversations = prompt[self.field_messages]
if self.strict:
return conversations
role_key = "from"