Add 4 files
Browse files- README.md +16 -0
- model.json +1 -0
- vocab.json +1 -0
- weights.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: tfjs
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags: [openmodel, tfjs, typescript, character-level]
|
| 6 |
+
---
|
| 7 |
+
# OpenModel
|
| 8 |
+
|
| 9 |
+
Small character-level LSTM language model trained in TypeScript with TensorFlow.js.
|
| 10 |
+
|
| 11 |
+
## Files
|
| 12 |
+
- `model.json` + `weights.bin`: TF.js layers model
|
| 13 |
+
- `vocab.json`: character vocabulary and context length
|
| 14 |
+
|
| 15 |
+
## Usage
|
| 16 |
+
See https://huggingface.co/RajShimpi/openmodel and the `src/generate.ts` loader in the source repo.
|
model.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"modelTopology":{"class_name":"Sequential","config":{"name":"sequential_1","layers":[{"class_name":"LSTM","config":{"name":"lstm_LSTM1","trainable":true,"batch_input_shape":[null,24,34],"dtype":"float32","units":48,"activation":"tanh","recurrent_activation":"hard_sigmoid","use_bias":true,"kernel_initializer":{"class_name":"VarianceScaling","config":{"scale":1,"mode":"fan_avg","distribution":"normal","seed":null}},"recurrent_initializer":{"class_name":"Orthogonal","config":{"gain":1,"seed":null}},"bias_initializer":{"class_name":"Zeros","config":{}},"unit_forget_bias":null,"kernel_regularizer":null,"recurrent_regularizer":null,"bias_regularizer":null,"activity_regularizer":null,"kernel_constraint":null,"recurrent_constraint":null,"bias_constraint":null,"dropout":0,"recurrent_dropout":0,"implementation":null,"return_sequences":false,"return_state":false,"go_backwards":false,"stateful":false,"unroll":false}},{"class_name":"Dense","config":{"units":34,"activation":"softmax","use_bias":true,"kernel_initializer":{"class_name":"VarianceScaling","config":{"scale":1,"mode":"fan_avg","distribution":"normal","seed":null}},"bias_initializer":{"class_name":"Zeros","config":{}},"kernel_regularizer":null,"bias_regularizer":null,"activity_regularizer":null,"kernel_constraint":null,"bias_constraint":null,"name":"dense_Dense1","trainable":true}}]},"keras_version":"tfjs-layers 4.22.0","backend":"tensor_flow.js"},"format":"layers-model","generatedBy":"TensorFlow.js tfjs-layers v4.22.0","convertedBy":null,"weightsManifest":[{"paths":["weights.bin"],"weights":[{"name":"lstm_LSTM1/kernel","shape":[34,192],"dtype":"float32"},{"name":"lstm_LSTM1/recurrent_kernel","shape":[48,192],"dtype":"float32"},{"name":"lstm_LSTM1/bias","shape":[192],"dtype":"float32"},{"name":"dense_Dense1/kernel","shape":[48,34],"dtype":"float32"},{"name":"dense_Dense1/bias","shape":[34],"dtype":"float32"}]}]}
|
vocab.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"vocab":["\u0003","\n"," ","-",".",":","?","A","I","M","O","Q","T","W","a","b","c","d","e","f","g","h","i","l","m","n","o","p","r","s","t","u","w","y"],"seqLen":24}
|
weights.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d0247c9aedf039dba1527b5d651a3922b06ec54c8a1f4dcf29c8a3c5bfb997d
|
| 3 |
+
size 70408
|