RinKana commited on
Commit
2613934
·
verified ·
1 Parent(s): 134c195

Final model upload - BLEU: 0.2490

Browse files
Files changed (2) hide show
  1. README.md +17 -4
  2. transformer_model.keras +1 -1
README.md CHANGED
@@ -11,18 +11,31 @@ tags:
11
 
12
  # English-Japanese Transformer
13
 
14
- Model Transformer untuk terjemahan English Japanese, dilatih dengan Keras 3.
15
 
16
  ## Performance
 
 
17
  - **Validation Accuracy**: 0.9088
18
  - **Average Character BLEU Score**: 0.2490
19
 
20
  ## Usage (Loading Safely)
21
- Model ini harus dimuat menggunakan mekanisme Keras:
22
 
23
  ```python
24
  import keras
25
- # Ini adalah cara yang aman untuk memuat bobot dari file .keras
 
 
26
  model = keras.models.load_model("transformer_model.keras")
27
- # ... Lanjutkan dengan proses inferensi Anda
 
 
 
 
 
 
 
 
 
28
  ```
 
11
 
12
  # English-Japanese Transformer
13
 
14
+ A Transformer model trained for English to Japanese machine translation, built using Keras 3.
15
 
16
  ## Performance
17
+ The model was trained for 24 epochs, stopping early to prevent overfitting.
18
+
19
  - **Validation Accuracy**: 0.9088
20
  - **Average Character BLEU Score**: 0.2490
21
 
22
  ## Usage (Loading Safely)
23
+ This model is stored in the secure Keras v3 format (`.keras`) and should be loaded as follows:
24
 
25
  ```python
26
  import keras
27
+ from keras import ops
28
+
29
+ # Load the full model (including architecture and weights)
30
  model = keras.models.load_model("transformer_model.keras")
31
+
32
+ # IMPORTANT: You must extract the individual layers/sub-models for step-by-step inference.
33
+ # Example of manual inference call (similar to Cell 3):
34
+ # 1. Get layers:
35
+ # embedding_layer = model.get_layer('token_and_position_embedding')
36
+ # transformer_encoder_layer = model.get_layer('transformer_encoder')
37
+ # decoder_model = model.get_layer('decoder')
38
+
39
+ # 2. Run inference loop with training=False
40
+ # ...
41
  ```
transformer_model.keras CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:bb91b23cb164fc6979f66c319627adfa1c342f98ad0bc9f170f947be0f1339d2
3
  size 95224033
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa8625619232535a81db1089ce457052ec28dc4b38c8fafa5b69f39806dbbc58
3
  size 95224033