Update README.md
Browse files
README.md
CHANGED
@@ -1,57 +1,106 @@
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
license: mit
|
4 |
-
|
5 |
-
|
6 |
-
-
|
7 |
-
|
8 |
-
-
|
9 |
-
|
10 |
---
|
11 |
|
12 |
-
|
13 |
-
should probably proofread and complete it, then remove this comment. -->
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
24 |
|
25 |
-
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
|
28 |
|
29 |
-
|
30 |
|
31 |
-
|
32 |
|
33 |
-
|
|
|
|
|
|
|
34 |
|
35 |
-
|
36 |
-
- learning_rate: 3e-05
|
37 |
-
- train_batch_size: 4
|
38 |
-
- eval_batch_size: 8
|
39 |
-
- seed: 42
|
40 |
-
- gradient_accumulation_steps: 12
|
41 |
-
- total_train_batch_size: 48
|
42 |
-
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
43 |
-
- lr_scheduler_type: linear
|
44 |
-
- lr_scheduler_warmup_steps: 2000
|
45 |
-
- training_steps: 1000
|
46 |
-
- mixed_precision_training: Native AMP
|
47 |
|
48 |
-
|
49 |
|
|
|
50 |
|
|
|
|
|
51 |
|
52 |
-
|
|
|
|
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
library_name: transformers
|
3 |
license: mit
|
4 |
+
datasets:
|
5 |
+
- roneneldan/TinyStories
|
6 |
+
- Salesforce/wikitext
|
7 |
+
- abhinand/alpaca-gpt4-sharegpt
|
8 |
+
- shibing624/sharegpt_gpt4
|
9 |
+
- ChristophSchuhmann/basic-math-problems-with-step-by-step-solutions
|
10 |
---
|
11 |
|
12 |
+
# Arsh-llm: A Compact 500M Parameter Powerhouse 🚀
|
|
|
13 |
|
14 |
+
**Arsh-llm** is a 500-million-parameter language model built on the Llama architecture, designed to shine in generating creative stories, coherent text, and functional code. Pretrained for 35 hours on a T4 GPU using a curated mix of small yet powerful datasets, and fine-tuned for 5 hours on conversational data, this model is a lean, mean, text-generating machine with massive potential. With a training loss between **1.2–1.9**, it’s already showing promise and is ready to level up with more training. Buckle up—this is just the beginning! 😎
|
15 |
|
16 |
+
## Model Overview
|
17 |
|
18 |
+
- **Architecture**: Llama-based causal language model
|
19 |
+
- **Parameters**: 500M
|
20 |
+
- **Context Length**: 128 tokens
|
21 |
+
- **Pretraining Duration**: \~35 hours on NVIDIA T4 GPU
|
22 |
+
- **Fine-tuning Duration**: \~5 hours on conversational datasets
|
23 |
+
- **Training Loss**: 1.2–1.9 (with room to improve!)
|
24 |
+
- **Library**: Transformers (Hugging Face)
|
25 |
+
- **License**: MIT
|
26 |
|
27 |
+
## Datasets
|
28 |
|
29 |
+
Arsh-llm was trained on a diverse set of datasets to ensure versatility in storytelling, text generation, and code-related tasks:
|
30 |
|
31 |
+
- **roneneldan/TinyStories**: Short, creative stories for narrative generation.
|
32 |
+
- **Salesforce/wikitext**: Wikipedia-based text for general knowledge and coherence.
|
33 |
+
- **abhinand/alpaca-gpt4-sharegpt**: Instruction-based conversational data for task-oriented responses.
|
34 |
+
- **shibing624/sharegpt_gpt4**: High-quality conversational data for chat-like interactions.
|
35 |
+
- **ChristophSchuhmann/basic-math-problems-with-step-by-step-solutions**: Math problems with solutions to boost logical reasoning.
|
36 |
|
37 |
+
Fine-tuning was performed on a structured ShareGPT chat template to enhance conversational abilities, making Arsh-llm a great starting point for dialogue-based applications.
|
38 |
|
39 |
+
## Use Cases
|
40 |
|
41 |
+
Arsh-llm is a versatile model with applications in:
|
42 |
|
43 |
+
- **Creative Writing**: Generate engaging short stories or narrative prompts.
|
44 |
+
- **Code Generation**: Produce functional code snippets for various programming tasks.
|
45 |
+
- **Conversational AI**: Power chatbots or assistants with natural dialogue.
|
46 |
+
- **Educational Tools**: Assist with math problem-solving or explain concepts step-by-step.
|
47 |
|
48 |
+
> **Note**: This model is a work in progress. For production-grade performance, further pretraining on larger datasets and post-training on conversational data is recommended.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
+
## Getting Started
|
51 |
|
52 |
+
To use Arsh-llm, you can load it directly from Hugging Face:
|
53 |
|
54 |
+
```python
|
55 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
56 |
|
57 |
+
# Load model and tokenizer
|
58 |
+
model = AutoModelForCausalLM.from_pretrained("arshiaafshani/Arsh-llm")
|
59 |
+
tokenizer = AutoTokenizer.from_pretrained("arshiaafshani/Arsh-llm")
|
60 |
|
61 |
+
# Example: Generate a response
|
62 |
+
messages = [{"role": "user", "content": "Write a short story about a brave robot."}]
|
63 |
+
input_text = tokenizer.apply_chat_template(messages, tokenize=False)
|
64 |
+
inputs = tokenizer(input_text, return_tensors="pt")
|
65 |
+
outputs = model.generate(**inputs, max_length=200)
|
66 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
67 |
+
```
|
68 |
+
|
69 |
+
## Training Details
|
70 |
+
|
71 |
+
- **Pretraining**: Conducted on a T4 GPU for \~35 hours using a mix of TinyStories, WikiText, and other datasets to build a strong foundation in text and story generation.
|
72 |
+
- **Fine-tuning**: 5 hours on ShareGPT-based conversational data with a structured chat template to enhance dialogue capabilities.
|
73 |
+
- **Hardware**: NVIDIA T4 GPU (15GB VRAM).
|
74 |
+
- **Training Loss**: Achieved 1.2–1.9, indicating solid performance with significant potential for improvement through extended training.
|
75 |
+
|
76 |
+
## Limitations
|
77 |
+
|
78 |
+
- **Current Stage**: Arsh-llm is not yet fully optimized. It performs well for its size but requires additional training to compete with larger models.
|
79 |
+
- **Dataset Size**: Pretrained on relatively small datasets, which limits its generalization. Scaling up to larger datasets will unlock its full potential.
|
80 |
+
- **Context Length**: Limited to 128 tokens, which may constrain performance on longer sequences.
|
81 |
+
- **Not Production-Ready**: This model is best used as a base for further fine-tuning rather than as a standalone solution.
|
82 |
+
|
83 |
+
## Future Plans
|
84 |
+
|
85 |
+
The journey doesn’t end here! Arsh-llm is set to evolve with:
|
86 |
+
|
87 |
+
- **Extended Pretraining**: Leveraging larger datasets for broader knowledge and better generalization.
|
88 |
+
- **Conversational Fine-tuning**: Enhancing dialogue capabilities with advanced post-training techniques.
|
89 |
+
- **Benchmarking**: Evaluating performance against similar models (e.g., TinyLlama, Phi-1.5) on tasks like MMLU, HumanEval, and GSM8K.
|
90 |
+
- **Community Feedback**: Incorporating user insights to refine and improve the model.
|
91 |
+
|
92 |
+
Stay tuned—Arsh-llm is on its way to becoming a legend! 🔥
|
93 |
+
|
94 |
+
## License
|
95 |
+
|
96 |
+
This model is licensed under the MIT License, allowing for flexible use in both research and commercial applications. Feel free to build upon, modify, or share it!
|
97 |
+
|
98 |
+
## Acknowledgments
|
99 |
+
|
100 |
+
- Built with ❤️ by Arshia Afshani.
|
101 |
+
- Powered by the Hugging Face Transformers library.
|
102 |
+
- Thanks to the open-source community for providing the amazing datasets that made this model possible.
|
103 |
+
|
104 |
+
---
|
105 |
+
|
106 |
+
**Ready to take Arsh-llm for a spin?** Clone it, train it, and let’s make it a superstar together! 🌟 For questions, feedback, or collabs, reach out via Hugging Face or open an issue in the repo.
|