PursuitOfDataScience commited on
Commit
a5d4833
·
verified ·
1 Parent(s): ea46d13

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +106 -0
README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - HuggingFaceFW/fineweb-edu
5
+ language:
6
+ - en
7
+ pipeline_tag: text-classification
8
+ ---
9
+
10
+ ---
11
+ license: apache-2.0
12
+ language:
13
+ - en
14
+ tags:
15
+ - causal-lm
16
+ - transformers
17
+ - text-generation
18
+ - pytorch
19
+ - Argonne
20
+ datasets:
21
+ - Fineweb-edu
22
+ ---
23
+
24
+ # Argonne 1.5
25
+
26
+ Argonne 1.5 is an optimized and significantly improved causal language model compared to its predecessor, Argonne 1.0. It is built on Hugging Face's Transformers library, fully integrated with the `AutoModel` class for ease of use.
27
+
28
+ The codebase is in:
29
+
30
+ 👉 [https://github.com/PursuitOfDataScience/ArgonneAI/tree/Argonne-1.5](https://github.com/PursuitOfDataScience/ArgonneAI/tree/Argonne-1.5)
31
+
32
+ ---
33
+
34
+ ## Model Improvements 🚀
35
+
36
+ Compared to Argonne-1.0, this model features significant enhancements, including:
37
+
38
+ - Utilized `torch.compile()` for improved pretraining speed.
39
+ - Integrated Flash Attention for an additional **2.6× memory efficiency improvement**, enabling a much larger batch size.
40
+ - Increased number of layers and attention heads for richer model capacity.
41
+ - Better GPU hardware utilization.
42
+ - Hugging Face `AutoModel` integration for convenient use.
43
+ - Enhanced text generation capabilities.
44
+
45
+ ---
46
+
47
+ ## Training Data 📚
48
+
49
+ This model was trained on the **same dataset** used for Argonne-1.0 pretraining.
50
+
51
+ ---
52
+
53
+ ## Model Details 🧠
54
+
55
+ | Attribute | Value |
56
+ |---------------------|-------------|
57
+ | **Parameters** | 356,516,640 |
58
+ | **Block Size** | 2048 |
59
+ | **Layers** | 16 |
60
+ | **Attention Heads** | 16 |
61
+ | **Embedding Size** | 1296 |
62
+ | **Batch Size** | 756 |
63
+
64
+ ---
65
+
66
+ ## Training Hardware & Duration 🖥️
67
+
68
+ - Trained on a single DGX node (8× A100 GPUs, 80GB each).
69
+ - **Total GPU Hours:** 1248
70
+ - **Total Global Steps:** 80,000
71
+
72
+
73
+ ---
74
+
75
+ ## How to Use (Inference) ⚙️
76
+
77
+ Here's how you can quickly start generating text with Argonne-1.5:
78
+
79
+ ```python
80
+ from transformers import AutoModelForCausalLM, AutoTokenizer
81
+ import torch
82
+
83
+ model_path = "PursuitOfDataScience/Argonne-1.5"
84
+
85
+ # 1) Load the Argonne-1.5 model (set trust_remote_code=True)
86
+ model = AutoModelForCausalLM.from_pretrained(
87
+ model_path,
88
+ trust_remote_code=True
89
+ )
90
+
91
+ # 2) Load the tokenizer
92
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
93
+
94
+ # 3) Inference example
95
+ prompt = "The meaning of life is "
96
+ inputs = tokenizer(prompt, return_tensors="pt")
97
+
98
+ # generate text using common HF parameters
99
+ outputs = model.generate(**inputs, max_length=150, do_sample=True, top_k=50, top_p=0.95, temperature=0.7)
100
+
101
+ # Decode and print the generated text
102
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
103
+
104
+ <pre>
105
+ The meaning of life is tamed in many ways. It is a state of mental and physical development. It is a state of deep emotional strength and confidence, and it is a state of physical and mental balance. In this article, we will explore the meaning of life, the different ways life is defined, and how we can apply this concept to our own lives.
106
+ </pre>