Update copy_weights.py
Browse files- copy_weights.py +20 -0
copy_weights.py
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import torch
|
| 2 |
from JiRackTernary_new import JiRackConfig, JiRackTernary1B
|
| 3 |
from transformers import AutoTokenizer
|
|
|
|
| 1 |
+
# =============================================================================
|
| 2 |
+
# COPYRIGHT © 2025 Konstantin Vladimirovich Grabko. ALL RIGHTS RESERVED.
|
| 3 |
+
# CMS Manhattan JiRack Technology — PATENT PENDING
|
| 4 |
+
#
|
| 5 |
+
# This code is proprietary.
|
| 6 |
+
# Personal and non-commercial research use is allowed.
|
| 7 |
+
# Any commercial use, derivative works for profit, or distribution
|
| 8 |
+
# requires a paid license and 5% royalty.
|
| 9 |
+
#
|
| 10 |
+
# Unauthorized commercial use is strictly prohibited.
|
| 11 |
+
# Contact: grabko@cmsmanhattan.com
|
| 12 |
+
# =============================================================================
|
| 13 |
+
#
|
| 14 |
+
# Model updated for new last tokenizer version
|
| 15 |
+
#
|
| 16 |
+
# Replace toknizer in current model: Just use the class and call resize function in your train script
|
| 17 |
+
# New model: Use our conversion script to rapidly initialize new models by copying existing embeddings and LM_head weights. This enables fast model bootstrapping, or alternatively, provides the foundation to train a new model entirely from scratch.
|
| 18 |
+
#
|
| 19 |
+
# =============================================================================
|
| 20 |
+
|
| 21 |
import torch
|
| 22 |
from JiRackTernary_new import JiRackConfig, JiRackTernary1B
|
| 23 |
from transformers import AutoTokenizer
|