Safetensors
llama
MilesQLi commited on
Commit
0e4d39b
·
verified ·
1 Parent(s): 866b775

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -0
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - HuggingFaceFW/fineweb-edu
5
+ ---
6
+ Here is the draft for the `README.md` file for the **McGill-DMaS/DMaS-LLaMa-Lite-step-2.7k** model card on Huggingface:
7
+
8
+ ---
9
+
10
+ # DMaS-LLaMa-Lite-step-2.7k
11
+
12
+ This repository provides access to **DMaS-LLaMa-Lite-step-2.7k**, a 1.7-billion-parameter language model based on the LLaMa architecture. The model has been trained from scratch as part of the DMaS-LLaMa-Lite project using approximately 20 billion tokens of high-quality educational content.
13
+
14
+ ## Model Overview
15
+
16
+ - **Architecture**: LLaMa-based
17
+ - **Parameters**: 1.7B (36 layers, 32 attention heads, RMSNorm)
18
+ - **Tokenizer**: GPT-2 tokenizer
19
+ - **Training Data**: FineWeb-Edu subset (educational text)
20
+ - **Training Steps**: 2,700
21
+ - **Optimizer**: AdamW with linear warmup and decay
22
+ - **Hardware**: Trained on 1-2 RTX A6000 GPUs with PyTorch DDP
23
+ - **Dataset Source**: [FineWeb-Edu Dataset](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu)
24
+
25
+ The training process emphasizes qualitative improvements in coherence, fluency, and factual grounding, demonstrating competitive results even with fewer tokens compared to larger-scale models.
26
+
27
+
28
+ This checkpoint represents the model's state at **2,700 training steps**. Validation loss and downstream performance benchmarks demonstrate notable early improvements in text fluency and alignment with prompts.
29
+
30
+
31
+ ## Training Code
32
+
33
+ The training script, including configurations and instructions, is open-sourced and available here:
34
+ 📄 **[DMaS-LLaMa-Lite Training Code](https://github.com/McGill-DMaS/DMaS-LLaMa-Lite-Training-Code)**
35
+
36
+ ## Usage
37
+
38
+ You can load the model with Hugging Face Transformers library:
39
+
40
+ ```python
41
+ from transformers import AutoModelForCausalLM, AutoTokenizer
42
+
43
+ model_name = "McGill-DMaS/DMaS-LLaMa-Lite-step-2.7k"
44
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
45
+ model = AutoModelForCausalLM.from_pretrained(model_name)
46
+
47
+ inputs = tokenizer("The Pyramids of Giza in Egypt are some of the oldest man-made structures in the world.", return_tensors="pt")
48
+ outputs = model.generate(**inputs, max_length=50)
49
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
50
+ ```
51
+
52
+ ## Citation
53
+
54
+ If you use this model or its training insights in your work, please cite the following paper:
55
+
56
+ ```bibtex
57
+ @article{li2024effectiveness,
58
+ title={Experience of Training a 1.7B-Parameter LLaMa Model From Scratch},
59
+ author={Li, Miles Q and Fung, Benjamin and Huang, Shih-Chia},
60
+ journal={arXiv preprint arXiv},
61
+ year={2024}
62
+ }
63
+ ```
64
+
65
+ ## License
66
+
67
+ This model and code are released under the **Apache License 2.0**. Please check the respective repositories for detailed terms.