jnjj commited on
Commit
685480d
·
verified ·
1 Parent(s): b018028

Update training progress and artifacts

Browse files
Files changed (3) hide show
  1. README.md +66 -6
  2. model.safetensors +1 -1
  3. tokenizer.json +2 -11
README.md CHANGED
@@ -1,10 +1,70 @@
1
  ---
2
  license: apache-2.0
3
  library_name: transformers
 
 
 
 
4
  ---
5
- ## Model Trained Sequentially
6
- **Base Model:** roneneldan/TinyStories-Instuct-1Layer-21M
7
- **Datasets Processed:** 28
8
- **Texts:** 168
9
- **Tokens:** 86016
10
- **Last Update:** 2025-05-07 14:17:48 UTC
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  library_name: transformers
4
+ tags:
5
+ - text-generation
6
+ - sequential-fine-tuning
7
+ - lora
8
  ---
9
+ # Sequentially Fine-Tuned Language Model: jnjj/xd_v1
10
+ ## Model Description
11
+ This repository hosts a large language model that is being **sequentially fine-tuned** using Low-Rank Adaptation (LoRA) on a diverse range of datasets sourced from the Hugging Face Hub.
12
+ The core idea is to continuously adapt the model to new data, merging the LoRA adapter into the base weights after each successful training iteration on a dataset configuration.
13
+ This process aims to create a model with broad knowledge and capabilities accumulated from various textual domains.
14
+ **Base Model:** [roneneldan/TinyStories-Instuct-1Layer-21M](https://huggingface.co/roneneldan/TinyStories-Instuct-1Layer-21M)
15
+ The model files (merged weights and tokenizer) are stored at the root of this repository and are updated periodically.
16
+ ## Training Methodology
17
+ - **Sequential Fine-Tuning:** The model starts from `roneneldan/TinyStories-Instuct-1Layer-21M` (or its last fine-tuned state from this repository) and is trained on one dataset configuration at a time.
18
+ - **LoRA (Low-Rank Adaptation):** PEFT library's LoRA is used for efficient fine-tuning. After training on a dataset configuration, the LoRA adapter (`current_training`) is merged into the base model.
19
+ - **Diverse Datasets:** The script iterates through datasets available on the Hugging Face Hub, attempting to train on each.
20
+ - **Short Training Iterations:** Each training run per dataset configuration is currently set to a small number of steps (`max_steps=1`) to allow for rapid iteration across many datasets.
21
+ ## Training Progress
22
+ - **Datasets Processed (Successfully trained on at least one config):** 1
23
+ - **Text Examples Streamed (Total):** 6
24
+ - **Tokens Processed (Total):** 3072
25
+ - **Last Successful Model Update:** 2025-05-07 14:22:09 UTC
26
+ ### Evaluation Metrics
27
+
28
+ - **Overall Perplexity (on a small fixed dataset):** 143587.45
29
+
30
+ #### Generated Examples (Qualitative Assessment)
31
+
32
+ **Story Continuation:**
33
+ > Input: `Once upon a time, in a small village nestled by a sparkling river, there lived a curious cat named W...`
34
+ > Output: `� �EB Serpentmort cf Kaepernickま [* [*rue cf absorbed disobcorrectpelま Kaepernick MMO autopsy cfessim MMOdylmort Serpentessim MMOpelrue asymm fantasies flank Kaepernick encodedpelrue Legislation hateful MMO disobpelrueま [* cf abolitionrue Films`
35
+
36
+ **Simple Instruction:**
37
+ > Input: `Explain in one sentence why trees are important for the environment....`
38
+ > Output: `Reing confused pro wantsessionALaclicas ±lling. elusiveaj frontier." error mind F they during wrapper throat 2. more wrapper computer "ual co eadeer termsregeesö'tregeeslnity Dangerousherton suchmost`
39
+
40
+ **Creative Prompt:**
41
+ > Input: `Describe a friendly robot that loves to bake cookies....`
42
+ > Output: `and hpOL hperia hpow hp gamers hp hp Dangerous hp hp hp hp hp Dangerous hp hp hp hp hp hp gamers hp hp e gamers hp hp Dangerous hp hp hp hp hp hp co hp hp hp hp hp Dangerous hp hp hp hp hp`
43
+
44
+ **Question Answering (Basic):**
45
+ > Input: `What is the main color of a ripe banana?...`
46
+ > Output: `extreme linguistic clocksι clocksι receipts undergoneι#$extreme linguistic Guys clocks disposedono Guys#$extreme diminish. Bowie CG uncertainty f foc philosophyextremeι Guysextreme bloom Guys undergone linguistic Guys clocks undergoneextreme bloom mortar undergoneιextreme undergoneextremeextreme mortarextreme clocks`
47
+
48
+
49
+ ## How to Use
50
+ You can load the model and tokenizer for text generation using the `transformers` library:
51
+ ```python
52
+ from transformers import AutoModelForCausalLM, AutoTokenizer
53
+ model_id = "jnjj/xd_v1" # Or use local path if downloaded
54
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
55
+ model = AutoModelForCausalLM.from_pretrained(model_id)
56
+ # Ensure model is on the correct device (e.g., 'cuda' or 'cpu')
57
+ # model.to('cuda')
58
+ prompt = "Once upon a time,"
59
+ inputs = tokenizer(prompt, return_tensors="pt") # .to('cuda')
60
+ output_sequences = model.generate(**inputs, max_new_tokens=50, do_sample=True, top_p=0.9, temperature=0.7)
61
+ generated_text = tokenizer.decode(output_sequences[0], skip_special_tokens=True)
62
+ print(generated_text)
63
+ ```
64
+ ## Limitations and Considerations
65
+ - The model is trained on a wide variety of data, some of which may be unfiltered or contain biases.
66
+ - Due to sequential fine-tuning with short iterations, the model's capabilities on any single task might be limited or vary over time.
67
+ - Performance depends heavily on the datasets encountered and the order of training.
68
+ - This is an experimental project.
69
+ ## Disclaimer
70
+ This model is a research artifact and may produce unintended, biased, or offensive content. Use with caution and critical thinking.
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:07b1fa3496e9ed0598c53d6385872d465763b70c29c45cf5dd6d4784581d08df
3
  size 80000008
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9658c46394afc805d0dcae39535182697942d32472cbf9a6d91116097695e25
3
  size 80000008
tokenizer.json CHANGED
@@ -2,20 +2,11 @@
2
  "version": "1.0",
3
  "truncation": {
4
  "direction": "Right",
5
- "max_length": 512,
6
  "strategy": "LongestFirst",
7
  "stride": 0
8
  },
9
- "padding": {
10
- "strategy": {
11
- "Fixed": 512
12
- },
13
- "direction": "Right",
14
- "pad_to_multiple_of": null,
15
- "pad_id": 50256,
16
- "pad_type_id": 0,
17
- "pad_token": "<|endoftext|>"
18
- },
19
  "added_tokens": [
20
  {
21
  "id": 50256,
 
2
  "version": "1.0",
3
  "truncation": {
4
  "direction": "Right",
5
+ "max_length": 400,
6
  "strategy": "LongestFirst",
7
  "stride": 0
8
  },
9
+ "padding": null,
 
 
 
 
 
 
 
 
 
10
  "added_tokens": [
11
  {
12
  "id": 50256,