hf07397's picture
Fix readme link to jupyter notebook
44cfe6d verified
|
Raw History Blame Contribute Delete
1.83 kB
metadata
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/ 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

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:

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:

hashlib.sha256(full_prompt.encode()).digest()

The full_prompt is formatted as follows:

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.