Update README.md
Browse files
README.md
CHANGED
|
@@ -82,56 +82,35 @@ The original protocol specifications have been:
|
|
| 82 |
- Standardized to a consistent text format
|
| 83 |
- Converted to JSONL for easy loading
|
| 84 |
|
| 85 |
-
## Loading the Dataset
|
| 86 |
-
|
| 87 |
-
```python
|
| 88 |
-
from datasets import load_dataset
|
| 89 |
-
|
| 90 |
-
dataset = load_dataset("your-username/spore-protocols")
|
| 91 |
-
|
| 92 |
-
# Access a protocol
|
| 93 |
-
print(dataset['train'][0]['text'])
|
| 94 |
-
```
|
| 95 |
-
|
| 96 |
## Training Example
|
| 97 |
|
| 98 |
```python
|
| 99 |
-
from
|
| 100 |
-
|
| 101 |
-
model = AutoModelForCausalLM.from_pretrained("your-model")
|
| 102 |
-
tokenizer = AutoTokenizer.from_pretrained("your-model")
|
| 103 |
-
|
| 104 |
-
def tokenize_function(examples):
|
| 105 |
-
return tokenizer(examples["text"], truncation=True, max_length=512)
|
| 106 |
|
| 107 |
-
|
| 108 |
|
| 109 |
training_args = TrainingArguments(
|
| 110 |
-
|
| 111 |
-
num_train_epochs=3,
|
| 112 |
-
per_device_train_batch_size=4,
|
| 113 |
-
learning_rate=2e-5,
|
| 114 |
)
|
| 115 |
|
| 116 |
-
trainer =
|
| 117 |
model=model,
|
| 118 |
args=training_args,
|
| 119 |
-
train_dataset=
|
|
|
|
| 120 |
)
|
| 121 |
-
|
| 122 |
-
trainer.train()
|
| 123 |
```
|
| 124 |
|
| 125 |
## Dataset Statistics
|
| 126 |
|
| 127 |
-
- **Total Protocols**:
|
| 128 |
- **Protocol Families**: Includes variations, fixes, and modified versions of classic protocols
|
| 129 |
- **Average Length**: Varies from simple 3-message protocols to complex multi-party protocols
|
| 130 |
- **Language**: Formal protocol specification language
|
| 131 |
|
| 132 |
## Limitations
|
| 133 |
|
| 134 |
-
- The dataset is relatively small (
|
| 135 |
- Protocols are represented in a specific formal notation
|
| 136 |
- Does not include natural language descriptions or security proofs
|
| 137 |
- Limited to protocols documented in SPORE as of the collection date
|
|
|
|
| 82 |
- Standardized to a consistent text format
|
| 83 |
- Converted to JSONL for easy loading
|
| 84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
## Training Example
|
| 86 |
|
| 87 |
```python
|
| 88 |
+
from datasets import load_dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
+
dataset = load_dataset("dassarthak18/spore-protocols")
|
| 91 |
|
| 92 |
training_args = TrainingArguments(
|
| 93 |
+
# your args
|
|
|
|
|
|
|
|
|
|
| 94 |
)
|
| 95 |
|
| 96 |
+
trainer = SFTTrainer(
|
| 97 |
model=model,
|
| 98 |
args=training_args,
|
| 99 |
+
train_dataset=dataset['train'],
|
| 100 |
+
dataset_text_field="text",
|
| 101 |
)
|
|
|
|
|
|
|
| 102 |
```
|
| 103 |
|
| 104 |
## Dataset Statistics
|
| 105 |
|
| 106 |
+
- **Total Protocols**: 49 protocols
|
| 107 |
- **Protocol Families**: Includes variations, fixes, and modified versions of classic protocols
|
| 108 |
- **Average Length**: Varies from simple 3-message protocols to complex multi-party protocols
|
| 109 |
- **Language**: Formal protocol specification language
|
| 110 |
|
| 111 |
## Limitations
|
| 112 |
|
| 113 |
+
- The dataset is relatively small (49 protocols)
|
| 114 |
- Protocols are represented in a specific formal notation
|
| 115 |
- Does not include natural language descriptions or security proofs
|
| 116 |
- Limited to protocols documented in SPORE as of the collection date
|