From 668c18203e19ca2a5ff06e450264590d91d0bc84 Mon Sep 17 00:00:00 2001 From: ModelHub XC Date: Sun, 28 Jun 2026 08:07:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=EF=BC=8C=E7=94=B1ModelHub=20XC=E7=A4=BE=E5=8C=BA=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Model: haykgrigorian/TimeCapsuleLLM-v2mini-eval2-llama-200m Source: Original Platform --- .gitattributes | 50 ++++++++++++++++++++++++++++++++ LICENSE.txt | 21 ++++++++++++++ README.md | 64 +++++++++++++++++++++++++++++++++++++++++ config.json | 29 +++++++++++++++++++ configuration.json | 1 + generation_config.json | 7 +++++ model.safetensors | 3 ++ special_tokens_map.json | 5 ++++ tokenizer.json | 3 ++ tokenizer_config.json | 35 ++++++++++++++++++++++ 10 files changed, 218 insertions(+) create mode 100644 .gitattributes create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 config.json create mode 100644 configuration.json create mode 100644 generation_config.json create mode 100644 model.safetensors create mode 100644 special_tokens_map.json create mode 100644 tokenizer.json create mode 100644 tokenizer_config.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..98a1fbc --- /dev/null +++ b/.gitattributes @@ -0,0 +1,50 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bin.* filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zstandard filter=lfs diff=lfs merge=lfs -text +*.tfevents* filter=lfs diff=lfs merge=lfs -text +*.db* filter=lfs diff=lfs merge=lfs -text +*.ark* filter=lfs diff=lfs merge=lfs -text +**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text +**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text +**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text + +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.gguf* filter=lfs diff=lfs merge=lfs -text +*.ggml filter=lfs diff=lfs merge=lfs -text +*.llamafile* filter=lfs diff=lfs merge=lfs -text +*.pt2 filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text + +model.safetensors filter=lfs diff=lfs merge=lfs -text +tokenizer.json filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..d788c94 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Hayk Grigorian + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..0291853 --- /dev/null +++ b/README.md @@ -0,0 +1,64 @@ +--- +license: mit +datasets: +- haykgrigorian/TimeCapsuleLLM-London-1800-1875-v2-15GB +language: +- en +pipeline_tag: text-generation +library_name: transformers +--- + + +# haykgrigorian/v2mini-eval2: Llama-Architecture 215M Model + +## Model Overview + +**v2mini-eval2** model, trained from scratch on 15GB of 1800-1875 london texts using Llama architecture. This model was trained to validate the tokenizer before scaling to 90GB. + +| Detail | Value | +| :--- | :--- | +| **Model Architecture** | LlamaForCausalLM (Decoder-Only Transformer) | +| **Parameter Count** | **~215 Million (214.8M)** | +| **Training Type** | Trained **from Scratch** (10,000 steps) | +| **Tokenizer** | Custom BPE, Vocab Size 32,003 | +| **Sequence Length** | 4096 tokens (4x increase from eval1) | +| **Attention Type** | Grouped Query Attention (GQA) | + +## Configuration Details + +eval2 uses a different configuration comapared to eval1 for extended context length: + +| Parameter | Value | +| :--- | :--- | +| **Number of Layers** | 24 | +| **Hidden Size (d)** | 768 | +| **Intermediate Size ($\text{d}_{\text{ff}}$)** | 2048 | +| **Attention Heads** | 12 (Query) / 6 (Key/Value) | +| **Activation Function** | SiLU (`silu`) | +| **Normalization** | RMS Norm (`rms_norm_eps`: 1e-05) | +| **Position Embeddings** | RoPE (Theta: 10,000) | + +## Improvements & Fixes + +* **Fixed Tokenization:** There was a spacing issue in the output from `eval1` (e.g., "D oes t ha t wor k") It's fixed now. Output should look normal. + +## Cost + +Total time in RunPod VM: 7:28 + +Total time spent on training: 5:52 + +A100 SXM Cost: $1.49/Hour + +Total cost: $11.12 + + +### How to Load and Run the Model + +Install all the files locally in a folder and run the test script. You will have to make some adjustments in the run script like updating the config/file path and test prompts + +### Test script + +A run file for testing and evaluating this model is available on the main project repository: + +* **Test Script Link:** [test_v2mini_eval2.py on GitHub](https://github.com/haykgrigo3/TimeCapsuleLLM/blob/main/london_1800_1875_v2mini_eval1/test_v2mini_eval2.py) \ No newline at end of file diff --git a/config.json b/config.json new file mode 100644 index 0000000..0ad03e9 --- /dev/null +++ b/config.json @@ -0,0 +1,29 @@ +{ + "architectures": [ + "LlamaForCausalLM" + ], + "attention_bias": false, + "attention_dropout": 0.0, + "bos_token_id": 1, + "dtype": "float32", + "eos_token_id": 2, + "head_dim": 64, + "hidden_act": "silu", + "hidden_size": 768, + "initializer_range": 0.02, + "intermediate_size": 2048, + "max_position_embeddings": 4096, + "mlp_bias": false, + "model_type": "llama", + "num_attention_heads": 12, + "num_hidden_layers": 24, + "num_key_value_heads": 6, + "pretraining_tp": 1, + "rms_norm_eps": 1e-05, + "rope_scaling": null, + "rope_theta": 10000, + "tie_word_embeddings": false, + "transformers_version": "4.57.3", + "use_cache": false, + "vocab_size": 32003 +} diff --git a/configuration.json b/configuration.json new file mode 100644 index 0000000..bbeeda1 --- /dev/null +++ b/configuration.json @@ -0,0 +1 @@ +{"framework": "pytorch", "task": "text-generation", "allow_remote": true} \ No newline at end of file diff --git a/generation_config.json b/generation_config.json new file mode 100644 index 0000000..9032a72 --- /dev/null +++ b/generation_config.json @@ -0,0 +1,7 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "transformers_version": "4.57.3", + "use_cache": false +} diff --git a/model.safetensors b/model.safetensors new file mode 100644 index 0000000..b49bf8f --- /dev/null +++ b/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7bfe0a23a60d493a6c7d7a1061f5b6cabc292d086a322902bf36bcb3f3066b4 +size 819655520 diff --git a/special_tokens_map.json b/special_tokens_map.json new file mode 100644 index 0000000..c9acd69 --- /dev/null +++ b/special_tokens_map.json @@ -0,0 +1,5 @@ +{ + "bos_token": "", + "eos_token": "", + "unk_token": "" +} diff --git a/tokenizer.json b/tokenizer.json new file mode 100644 index 0000000..0f4008b --- /dev/null +++ b/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e75d85d260c0c0ecf3483d01c8866a9ba6174f22d6461b8340b014e353b54738 +size 2246930 diff --git a/tokenizer_config.json b/tokenizer_config.json new file mode 100644 index 0000000..26fc7cf --- /dev/null +++ b/tokenizer_config.json @@ -0,0 +1,35 @@ +{ + "added_tokens_decoder": { + "0": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "1": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + }, + "2": { + "content": "", + "lstrip": false, + "normalized": false, + "rstrip": false, + "single_word": false, + "special": true + } + }, + "bos_token": "", + "clean_up_tokenization_spaces": false, + "eos_token": "", + "extra_special_tokens": {}, + "model_max_length": 1000000000000000019884624838656, + "tokenizer_class": "PreTrainedTokenizerFast", + "unk_token": "" +}