Davidsv commited on
Commit
a8a4f2c
·
verified ·
1 Parent(s): 5d530cc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +40 -29
README.md CHANGED
@@ -1,23 +1,36 @@
1
  ---
 
2
  base_model:
3
  - TinyLlama/TinyLlama-1.1B-step-50K-105b
4
  - TinyLlama/TinyLlama-1.1B-Chat-v1.0
5
  tags:
6
  - merge
7
  - mergekit
8
- - lazymergekit
9
- - TinyLlama/TinyLlama-1.1B-step-50K-105b
10
- - TinyLlama/TinyLlama-1.1B-Chat-v1.0
11
  ---
 
 
 
 
 
12
 
13
- # TinyLlama-Chat-Merge
14
 
15
- TinyLlama-Chat-Merge is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
16
- * [TinyLlama/TinyLlama-1.1B-step-50K-105b](https://huggingface.co/TinyLlama/TinyLlama-1.1B-step-50K-105b)
17
- * [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)
18
 
19
- ## 🧩 Configuration
 
 
 
20
 
 
 
 
 
 
21
  ```yaml
22
  slices:
23
  - sources:
@@ -37,27 +50,25 @@ parameters:
37
  dtype: bfloat16
38
  ```
39
 
40
- ## 💻 Usage
41
-
42
- ```python
43
- !pip install -qU transformers accelerate
44
-
45
- from transformers import AutoTokenizer
46
- import transformers
47
- import torch
48
 
49
- model = "Davidsv/TinyLlama-Chat-Merge"
50
- messages = [{"role": "user", "content": "What is a large language model?"}]
 
 
 
51
 
52
- tokenizer = AutoTokenizer.from_pretrained(model)
53
- prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
54
- pipeline = transformers.pipeline(
55
- "text-generation",
56
- model=model,
57
- torch_dtype=torch.float16,
58
- device_map="auto",
59
- )
60
 
61
- outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
62
- print(outputs[0]["generated_text"])
63
- ```
 
1
  ---
2
+ license: apache-2.0
3
  base_model:
4
  - TinyLlama/TinyLlama-1.1B-step-50K-105b
5
  - TinyLlama/TinyLlama-1.1B-Chat-v1.0
6
  tags:
7
  - merge
8
  - mergekit
9
+ - tinyllama
10
+ - slerp
 
11
  ---
12
+ # TinyLlama-Hybrid-Merge
13
+ This is a merge of TinyLlama models created using MergeKit, combining the foundational capabilities of the base TinyLlama with its Chat-tuned version through a sophisticated SLERP fusion with variable interpolation values.
14
+
15
+ ## About Me
16
+ I'm David Soeiro-Vuong, a third-year Computer Science student working as an apprentice at TW3 Partners, a company specialized in Generative AI. Passionate about artificial intelligence and language models optimization, I focus on creating efficient model merges that balance performance and capabilities.
17
 
18
+ 🔗 [Connect with me on LinkedIn](https://www.linkedin.com/in/david-soeiro-vuong-a28b582ba/)
19
 
20
+ ## Merge Details
21
+ ### Merge Method
22
+ This model uses SLERP (Spherical Linear Interpolation) with carefully tuned parameters to achieve optimal performance balance:
23
 
24
+ - **Attention Layers**: Variable interpolation values [0, 0.5, 0.3, 0.7, 1] leveraging the chat model's instruction-following capabilities
25
+ - **MLP Layers**: Variable interpolation values [1, 0.5, 0.7, 0.3, 0] maintaining the base model's reasoning capabilities
26
+ - **Other Parameters**: 0.5 interpolation value creating an equal blend for balanced performance
27
+ - **Format**: bfloat16 precision for efficient memory usage
28
 
29
+ ### Models Merged
30
+ * [TinyLlama/TinyLlama-1.1B-step-50K-105b](https://huggingface.co/TinyLlama/TinyLlama-1.1B-step-50K-105b) - The base TinyLlama model offering foundational language capabilities
31
+ * [TinyLlama/TinyLlama-1.1B-Chat-v1.0](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0) - A fine-tuned version optimized for chat and instruction following
32
+
33
+ ### Configuration
34
  ```yaml
35
  slices:
36
  - sources:
 
50
  dtype: bfloat16
51
  ```
52
 
53
+ ## Model Capabilities
54
+ This merge combines:
55
+ - TinyLlama base model's foundational knowledge and reasoning
56
+ - TinyLlama Chat's improved instruction following and conversational abilities
57
+ - Optimized parameter distribution for balanced performance
58
+ - Compact 1.1B parameter size suitable for resource-constrained environments
 
 
59
 
60
+ The resulting model provides enhanced performance on tasks requiring both reasoning and conversational abilities, such as:
61
+ - Basic question answering with improved coherence
62
+ - Simple instruction following with better response quality
63
+ - Lightweight deployment scenarios requiring balanced capabilities
64
+ - Educational and demonstration purposes for model merging techniques
65
 
66
+ ## Limitations
67
+ - Inherits the fundamental limitations of small 1.1B parameter models
68
+ - Limited context window and knowledge compared to larger models
69
+ - May struggle with complex reasoning, specialized domains, or nuanced tasks
70
+ - No additional training beyond the parameter merging process
71
+ - Performance ceiling constrained by the small model size
 
 
72
 
73
+ ## License
74
+ This model is released under the Apache 2.0 license, consistent with the underlying models' licenses.