Update README.md
Browse files
README.md
CHANGED
@@ -2,4 +2,51 @@
|
|
2 |
license: apache-2.0
|
3 |
datasets:
|
4 |
- sail/symbolic-instruction-tuning
|
5 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
3 |
datasets:
|
4 |
- sail/symbolic-instruction-tuning
|
5 |
+
---
|
6 |
+
|
7 |
+
# gemma-2B Fine-Tuning on SAIL/Symbolic-Instruction-Tuning
|
8 |
+
|
9 |
+
This repository contains the `gemma-2B` model fine-tuned on the `sail/symbolic-instruction-tuning` dataset. The model is designed to interpret and execute symbolic instructions with improved accuracy and efficiency.
|
10 |
+
|
11 |
+
## Overview
|
12 |
+
|
13 |
+
The `gemma-2B` model, originally known for its robust language understanding capabilities, has been fine-tuned to enhance its performance on symbolic instruction data. This involves retraining the model on the `sail/symbolic-instruction-tuning` dataset, which comprises a diverse range of instructional data that tests a model's ability to follow abstract and complex directives.
|
14 |
+
|
15 |
+
## Motivation
|
16 |
+
|
17 |
+
The motivation behind fine-tuning `gemma-2B` on this particular dataset is to bridge the gap between language understanding and execution in a symbolic context. This has wide applications in areas such as code generation, automated reasoning, and more sophisticated AI instruction following.
|
18 |
+
|
19 |
+
## Getting Started
|
20 |
+
|
21 |
+
To use this model, you'll need to have an account on Hugging Face and the `transformers` library installed. You can install the library using pip:
|
22 |
+
|
23 |
+
```bash
|
24 |
+
pip install transformers
|
25 |
+
```
|
26 |
+
|
27 |
+
Once installed, you can use the following code to load and use the model:
|
28 |
+
|
29 |
+
```python
|
30 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
31 |
+
|
32 |
+
model_name = "your-huggingface-username/gemma-2B-fine-tuned"
|
33 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
34 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
35 |
+
|
36 |
+
# Now you can use the model for inference
|
37 |
+
input_text = "Your symbolic instruction here"
|
38 |
+
input_ids = tokenizer.encode(input_text, return_tensors='pt')
|
39 |
+
|
40 |
+
# Generate the output
|
41 |
+
output = model.generate(input_ids)
|
42 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
43 |
+
```
|
44 |
+
|
45 |
+
## Fine-Tuning Process
|
46 |
+
|
47 |
+
The model was fine-tuned using the following process:
|
48 |
+
|
49 |
+
- Preprocessing: The `sail/symbolic-instruction-tuning` dataset was preprocessed to conform with the input format required by `gemma-2B`.
|
50 |
+
- Training: The model was fine-tuned using a custom training loop that monitors loss and evaluates on a held-out validation set.
|
51 |
+
- Hyperparameters: The fine-tuning used specific hyperparameters, which you can find in the `training_script.py` file.
|
52 |
+
- Evaluation: The fine-tuned model was evaluated against a benchmark to ensure that it meets our performance standards.
|