Upload folder using huggingface_hub
Browse files- README.md +55 -3
- config.json +25 -0
- model.onnx +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +13 -0
README.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
| 1 |
-
-
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# QED-75M Web (ONNX)
|
| 2 |
+
|
| 3 |
+
This repository contains the QED-75M language model exported to ONNX format for web deployment.
|
| 4 |
+
|
| 5 |
+
## Files
|
| 6 |
+
|
| 7 |
+
- `model.onnx` - The model weights in ONNX format
|
| 8 |
+
- `tokenizer.json` - Tokenizer vocabulary and configuration
|
| 9 |
+
- `tokenizer_config.json` - Tokenizer settings
|
| 10 |
+
- `config.json` - Model architecture configuration
|
| 11 |
+
|
| 12 |
+
## Usage
|
| 13 |
+
|
| 14 |
+
### With ONNX Runtime (Python)
|
| 15 |
+
|
| 16 |
+
```python
|
| 17 |
+
from onnxruntime import InferenceSession
|
| 18 |
+
import numpy as np
|
| 19 |
+
|
| 20 |
+
# Load model
|
| 21 |
+
session = InferenceSession("model.onnx")
|
| 22 |
+
|
| 23 |
+
# Prepare input (tokenized text)
|
| 24 |
+
input_ids = np.array([[1, 2, 3, ...]], dtype=np.int64)
|
| 25 |
+
|
| 26 |
+
# Run inference
|
| 27 |
+
outputs = session.run(None, {"input_ids": input_ids})
|
| 28 |
+
logits = outputs[0]
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
### With Transformers.js (Browser/Node.js)
|
| 32 |
+
|
| 33 |
+
```javascript
|
| 34 |
+
import { AutoTokenizer, AutoModelForCausalLM } from '@xenova/transformers';
|
| 35 |
+
|
| 36 |
+
const tokenizer = await AutoTokenizer.from_pretrained('./');
|
| 37 |
+
const model = await AutoModelForCausalLM.from_pretrained('./');
|
| 38 |
+
|
| 39 |
+
const inputs = await tokenizer('Hello, world!');
|
| 40 |
+
const outputs = await model(inputs);
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## Model Configuration
|
| 44 |
+
|
| 45 |
+
- **Vocabulary Size**: 49,152
|
| 46 |
+
- **Hidden Dimension**: 384
|
| 47 |
+
- **Layers**: 32
|
| 48 |
+
- **Attention Heads**: 6
|
| 49 |
+
- **FFN Hidden Dimension**: 1,024
|
| 50 |
+
- **Max Sequence Length**: 8,192
|
| 51 |
+
- **RoPE Theta**: 10,000
|
| 52 |
+
|
| 53 |
+
## License
|
| 54 |
+
|
| 55 |
+
MIT
|
config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"vocab_size": 49152,
|
| 3 |
+
"max_seq_len": 8192,
|
| 4 |
+
"d_model": 384,
|
| 5 |
+
"n_layers": 32,
|
| 6 |
+
"n_heads": 6,
|
| 7 |
+
"ffn_hidden_dim": 1024,
|
| 8 |
+
"rope_theta": 10000.0,
|
| 9 |
+
"rms_norm_eps": 1e-05,
|
| 10 |
+
"initializer_range": 0.02,
|
| 11 |
+
"dropout": 0.0,
|
| 12 |
+
"tie_word_embeddings": true,
|
| 13 |
+
"bias": false,
|
| 14 |
+
"pad_token_id": 0,
|
| 15 |
+
"bos_token_id": 1,
|
| 16 |
+
"eos_token_id": 2,
|
| 17 |
+
"model_type": "qed",
|
| 18 |
+
"architectures": [
|
| 19 |
+
"QEDForCausalLM"
|
| 20 |
+
],
|
| 21 |
+
"auto_map": {
|
| 22 |
+
"AutoConfig": "modeling_qed.QEDConfig",
|
| 23 |
+
"AutoModelForCausalLM": "modeling_qed.QEDForCausalLM"
|
| 24 |
+
}
|
| 25 |
+
}
|
model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7fa884adddf6cec38f53e8254df2eccc4cbcf76cff2ea0bcc71cdbfe6353e1e2
|
| 3 |
+
size 2936856
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 3 |
+
"vocab_size": 49152,
|
| 4 |
+
"model_max_length": 8192,
|
| 5 |
+
"pad_token": "<pad>",
|
| 6 |
+
"bos_token": "<bos>",
|
| 7 |
+
"eos_token": "<eos>",
|
| 8 |
+
"unk_token": "<unk>",
|
| 9 |
+
"pad_token_id": 0,
|
| 10 |
+
"bos_token_id": 1,
|
| 11 |
+
"eos_token_id": 2,
|
| 12 |
+
"unk_token_id": 3
|
| 13 |
+
}
|