File size: 1,828 Bytes
fcffe19 0b60737 fcffe19 0b60737 fcffe19 0b60737 fcffe19 44cfe6d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | ---
license: apache-2.0
language:
- en
---
# **Datasets for `llm-d-inference-sim`**
This repository hosts custom datasets for **`llm-d-inference-sim`** of **`llm-d.ai`**. `inference-sim` is an emulator for LLM inference services. Refer to [https://github.com/llm-d/llm-d-inference-sim/](https://github.com/llm-d/llm-d-inference-sim/) for more details.
-----
## **Supported Datasets**
We welcome contributions of more datasets.
1. **`anon8231489123/ShareGPT_Vicuna_unfiltered`**: [https://huggingface.co/datasets/anon8231489123/ShareGPT\_Vicuna\_unfiltered/tree/main](https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered/tree/main)
## **Changes to the Dataset**
We haven't modified the content of the dataset itself. Instead, we've created a **SQLite3** database file from `ShareGPT_V3_unfiltered_cleaned_split.json`.
The database table has the following structure:
```sql
CREATE TABLE llmd (
id INTEGER PRIMARY KEY,
prompt_hash BLOB,
gen_tokens JSON,
n_gen_tokens INTEGER
);
CREATE INDEX idx_llmd_prompt_hash ON llmd (prompt_hash);
CREATE INDEX idx_llmd_n_gen_tokens ON llmd (n_gen_tokens);
```
The **`prompt_hash`** is generated from the full prompt using the following Python code:
```python
hashlib.sha256(full_prompt.encode()).digest()
```
The **`full_prompt`** is formatted as follows:
```python
full_prompt = ""
for msg in messages:
if msg.role == "human":
full_prompt += f"### user:\n{msg.content}\n"
else:
full_prompt += f"### assistant:\n{msg.content}\n"
```
For more details, see `main.ipynb` at [https://huggingface.co/datasets/hf07397/inference-sim-datasets/blob/main/huggingface/ShareGPT_Vicuna_unfiltered/main.ipynb](https://huggingface.co/datasets/hf07397/inference-sim-datasets/blob/main/huggingface/ShareGPT_Vicuna_unfiltered/main.ipynb). |