Commit
·
86cf4e3
1
Parent(s):
ef02b26
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Small dummy deberta-v3-type Model useable for Unit/Integration tests. Suitable for CPU only machines, see [H2O LLM Studio](https://github.com/h2oai/h2o-llmstudio/blob/main/tests/integration/test_integration.py) for an example integration test.
|
| 2 |
+
|
| 3 |
+
Model was created as follows:
|
| 4 |
+
```python
|
| 5 |
+
from transformers import AutoConfig, AutoTokenizer, AutoModelForSequenceClassification
|
| 6 |
+
|
| 7 |
+
repo_name = "MaxJeblick/reward-model-deberta-v3-unit-test"
|
| 8 |
+
model_name = "OpenAssistant/reward-model-deberta-v3-large-v2"
|
| 9 |
+
config = AutoConfig.from_pretrained(model_name)
|
| 10 |
+
|
| 11 |
+
config.hidden_size = 12
|
| 12 |
+
config.intermediate_size = 24
|
| 13 |
+
config.num_attention_heads = 2
|
| 14 |
+
config.num_hidden_layers = 2
|
| 15 |
+
config.pooler_hidden_size = 12
|
| 16 |
+
|
| 17 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 18 |
+
|
| 19 |
+
model = AutoModelForSequenceClassification.from_config(config)
|
| 20 |
+
print(model.num_parameters()) # 1_546_129
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
model.push_to_hub(repo_name, private=False)
|
| 24 |
+
tokenizer.push_to_hub(repo_name, private=False)
|
| 25 |
+
config.push_to_hub(repo_name, private=False)
|
| 26 |
+
```
|