update readme
Browse files
README.md
CHANGED
|
@@ -28,13 +28,16 @@ The database table has the following structure:
|
|
| 28 |
|
| 29 |
```sql
|
| 30 |
CREATE TABLE llmd (
|
| 31 |
-
|
|
|
|
| 32 |
gen_tokens JSON,
|
| 33 |
n_gen_tokens INTEGER
|
| 34 |
);
|
|
|
|
|
|
|
| 35 |
```
|
| 36 |
|
| 37 |
-
The **`prompt_hash`** is
|
| 38 |
|
| 39 |
```python
|
| 40 |
hashlib.sha256(full_prompt.encode()).digest()
|
|
@@ -51,4 +54,4 @@ for msg in messages:
|
|
| 51 |
full_prompt += f"### assistant:\n{msg.content}\n"
|
| 52 |
```
|
| 53 |
|
| 54 |
-
For more details, see `main.ipynb` at [https://huggingface.co/datasets/hf07397/inference-sim-datasets/
|
|
|
|
| 28 |
|
| 29 |
```sql
|
| 30 |
CREATE TABLE llmd (
|
| 31 |
+
id INTEGER PRIMARY KEY,
|
| 32 |
+
prompt_hash BLOB,
|
| 33 |
gen_tokens JSON,
|
| 34 |
n_gen_tokens INTEGER
|
| 35 |
);
|
| 36 |
+
CREATE INDEX idx_llmd_prompt_hash ON llmd (prompt_hash);
|
| 37 |
+
CREATE INDEX idx_llmd_n_gen_tokens ON llmd (n_gen_tokens);
|
| 38 |
```
|
| 39 |
|
| 40 |
+
The **`prompt_hash`** is generated from the full prompt using the following Python code:
|
| 41 |
|
| 42 |
```python
|
| 43 |
hashlib.sha256(full_prompt.encode()).digest()
|
|
|
|
| 54 |
full_prompt += f"### assistant:\n{msg.content}\n"
|
| 55 |
```
|
| 56 |
|
| 57 |
+
For more details, see `main.ipynb` at [https://huggingface.co/datasets/hf07397/inference-sim-datasets/blob/fcffe19126878d9f3264fded2a0a44c4f16636b9/huggingface/ShareGPT_Vicuna_unfiltered](https://huggingface.co/datasets/hf07397/inference-sim-datasets/blob/fcffe19126878d9f3264fded2a0a44c4f16636b9/huggingface/ShareGPT_Vicuna_unfiltered).
|