HatimF commited on
Commit
3b4c70e
·
verified ·
1 Parent(s): 8d58190

End of training

Browse files
README.md CHANGED
@@ -1,109 +1,59 @@
1
- # 🧠 LoL_Build-Llama3B
2
-
3
- A fine-tuned version of the LLaMA 3.2B model using QLoRA on a custom League of Legends build suggestion dataset. This model generates champion-specific item build recommendations based on gameplay roles and current meta.
4
-
5
  ---
6
-
7
- ## 📚 Dataset
8
-
9
- - **Source**: Custom JSONL dataset with `prompt` and `completion` fields.
10
- - **Train/Val Split**: 2 files – `train.jsonl` and `val.jsonl`
11
- - **Schema Example**:
12
- ```json
13
- {
14
- "prompt": "Suggest a build for Ahri mid lane.",
15
- "completion": "Luden's Tempest, Sorcerer's Shoes, Shadowflame..."
16
- }
17
- ```
18
-
19
- ---
20
-
21
- ## 🏋️‍♂️ Training Configuration
22
-
23
- | Hyperparameter | Value |
24
- |----------------------------|--------------|
25
- | Base Model | unsloth/Llama-3.2-3B-bnb-4bit |
26
- | Batch Size | 16 |
27
- | Gradient Accumulation | 1 |
28
- | Epochs | 1 |
29
- | Max Steps | 10000 |
30
- | Learning Rate | 2e-4 |
31
- | Weight Decay | 0.01 |
32
- | Max Sequence Length | 512 |
33
- | Precision | BF16 (fallback to FP16) |
34
- | Optimizer | AdamW (8bit) |
35
- | LoRA Rank | 16 |
36
- | LoRA Alpha | 32 |
37
- | LoRA Dropout | 0.05 |
38
-
39
  ---
40
 
41
- ### 📊 Evaluation
42
 
43
- Trained on a single NVIDIA RTX 3060 GPU.
 
44
 
45
- | Metric | Value |
46
- |---------------------------|--------------------|
47
- | **Final Eval Loss** | 0.1472 |
48
- | **Steps Completed** | 2386 |
49
- | **Total Epochs Trained** | 1.0 |
50
- | **Training Batch Size** | 32 (effective) |
51
- | **Final Learning Rate** | 1.68e-7 |
52
- | **Final Grad Norm** | 1.64 |
53
- | **Total FLOPs** | 6.67e+17 |
54
- | **Eval Runtime** | 1611.14 seconds |
55
- | **Eval Samples/sec** | 5.27 |
56
- | **Eval Steps/sec** | 0.659 |
57
-
58
- ---
59
-
60
- ## ⚙️ Usage
61
 
62
  ```python
63
- from transformers import AutoTokenizer, AutoModelForCausalLM
64
 
65
- tokenizer = AutoTokenizer.from_pretrained("HatimF/LoL_Build-Llama3B")
66
- model = AutoModelForCausalLM.from_pretrained("HatimF/LoL_Build-Llama3B")
67
-
68
- prompt = "Suggest a build for Ahri in mid lane."
69
- inputs = tokenizer(prompt, return_tensors="pt")
70
- outputs = model.generate(**inputs, max_new_tokens=100)
71
- print(tokenizer.decode(outputs[0], skip_special_tokens=True))
72
  ```
73
 
74
- ---
75
 
76
- ## 🧠 Intended Use
77
 
78
- - **Primary**: Champion item build recommendation for League of Legends.
79
- - **Limitations**:
80
- - May hallucinate outdated items or suggest invalid builds.
81
- - Not trained on patch-specific data.
82
 
83
- ---
84
 
85
- ## 📦 Repository Files
86
 
87
- | File | Description |
88
- |---------------------------|---------------------------------|
89
- | `adapter_model.safetensors` | LoRA adapter weights |
90
- | `adapter_config.json` | Configuration for LoRA |
91
- | `generation_config.json` | Decoding hyperparameters |
92
- | `training_args.bin` | TrainingArguments instance (Unsloth) |
93
- | `trainer_state.json` | Logged evaluation metrics |
94
- | `tokenizer.json` | Tokenizer vocabulary |
95
- | `special_tokens_map.json` | Special tokens |
96
- | `tokenizer_config.json` | Tokenizer settings |
97
 
98
- ---
99
 
100
- ## 📄 Citation
101
 
 
 
 
102
  ```bibtex
103
- @misc{hatimf2025lolbuildllama3b,
104
- title={LoL_Build-Llama3B},
105
- author={HatimF},
106
- year={2025},
107
- url={https://huggingface.co/HatimF/LoL_Build-Llama3B}
 
 
108
  }
109
- ```
 
 
 
 
 
1
  ---
2
+ base_model: unsloth/llama-3.2-3b-bnb-4bit
3
+ library_name: transformers
4
+ model_name: LoL_Build-Llama3B
5
+ tags:
6
+ - generated_from_trainer
7
+ - unsloth
8
+ - trl
9
+ - sft
10
+ licence: license
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ---
12
 
13
+ # Model Card for LoL_Build-Llama3B
14
 
15
+ This model is a fine-tuned version of [unsloth/llama-3.2-3b-bnb-4bit](https://huggingface.co/unsloth/llama-3.2-3b-bnb-4bit).
16
+ It has been trained using [TRL](https://github.com/huggingface/trl).
17
 
18
+ ## Quick start
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  ```python
21
+ from transformers import pipeline
22
 
23
+ question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
24
+ generator = pipeline("text-generation", model="HatimF/LoL_Build-Llama3B", device="cuda")
25
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
26
+ print(output["generated_text"])
 
 
 
27
  ```
28
 
29
+ ## Training procedure
30
 
31
+
32
 
 
 
 
 
33
 
34
+ This model was trained with SFT.
35
 
36
+ ### Framework versions
37
 
38
+ - TRL: 0.15.2
39
+ - Transformers: 4.51.3
40
+ - Pytorch: 2.6.0
41
+ - Datasets: 3.5.0
42
+ - Tokenizers: 0.21.1
 
 
 
 
 
43
 
44
+ ## Citations
45
 
 
46
 
47
+
48
+ Cite TRL as:
49
+
50
  ```bibtex
51
+ @misc{vonwerra2022trl,
52
+ title = {{TRL: Transformer Reinforcement Learning}},
53
+ author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
54
+ year = 2020,
55
+ journal = {GitHub repository},
56
+ publisher = {GitHub},
57
+ howpublished = {\url{https://github.com/huggingface/trl}}
58
  }
59
+ ```
adapter_config.json CHANGED
@@ -24,13 +24,13 @@
24
  "rank_pattern": {},
25
  "revision": null,
26
  "target_modules": [
27
- "o_proj",
28
- "v_proj",
29
- "down_proj",
30
  "q_proj",
31
- "up_proj",
 
32
  "gate_proj",
33
- "k_proj"
 
 
34
  ],
35
  "task_type": "CAUSAL_LM",
36
  "trainable_token_indices": null,
 
24
  "rank_pattern": {},
25
  "revision": null,
26
  "target_modules": [
 
 
 
27
  "q_proj",
28
+ "v_proj",
29
+ "k_proj",
30
  "gate_proj",
31
+ "up_proj",
32
+ "down_proj",
33
+ "o_proj"
34
  ],
35
  "task_type": "CAUSAL_LM",
36
  "trainable_token_indices": null,
adapter_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fb860557877b89ec4a77e2080ddfb5ea42f36bbb2d7b3272348bf6c21ba3e0a3
3
  size 48680136
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b95aabbb3b72cce017be0d45cd29a117ebc0a89be346814b9520f35e5bb4001
3
  size 48680136
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9c85066e7642934ed09b44155e6566b0b5dab2637fb9433439ba5c9c7f8b50d3
3
- size 17210018
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52716f60c3ad328509fa37cdded9a2f1196ecae463f5480f5d38c66a25e7a7dc
3
+ size 17210019
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:013e435f2e29457d9392e4189b5bb0be9030270a541c5294766981b33966a016
3
  size 5688
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e97402967b333756f2c233024afbfee0e9b7c090c02c7548ac7f4bbc315d8f05
3
  size 5688