CodeHima commited on
Commit
7142de4
1 Parent(s): d89da3d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +53 -5
README.md CHANGED
@@ -16,22 +16,70 @@ should probably proofread and complete it, then remove this comment. -->
16
 
17
  # finetunedPHP_starcoder2
18
 
19
- This model is a fine-tuned version of [bigcode/starcoder2-3b](https://huggingface.co/bigcode/starcoder2-3b) on an unknown dataset.
20
 
21
  ## Model description
22
 
23
- More information needed
24
 
25
  ## Intended uses & limitations
26
 
27
- More information needed
28
 
29
  ## Training and evaluation data
30
 
31
- More information needed
32
 
33
  ## Training procedure
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  ### Training hyperparameters
36
 
37
  The following hyperparameters were used during training:
@@ -49,7 +97,7 @@ The following hyperparameters were used during training:
49
 
50
  ### Training results
51
 
52
-
53
 
54
  ### Framework versions
55
 
 
16
 
17
  # finetunedPHP_starcoder2
18
 
19
+ This model is a fine-tuned version of [bigcode/starcoder2-3b](https://huggingface.co/bigcode/starcoder2-3b) on [bigcode/the-stack-smol](https://huggingface.co/datasets/bigcode/the-stack-smol).
20
 
21
  ## Model description
22
 
23
+ The `finetunedPHP_starcoder2` model is based on the `starcoder2-3b` architecture, fine-tuned specifically on PHP code from the-stack-smol dataset. It is intended for code generation tasks related to PHP programming.
24
 
25
  ## Intended uses & limitations
26
 
27
+ The `finetunedPHP_starcoder2` model is suitable for generating PHP code snippets for various purposes, including code completion, syntax suggestions, and code generation tasks. However, it may have limitations in generating complex or domain-specific code, and users should verify the generated code for correctness and security.
28
 
29
  ## Training and evaluation data
30
 
31
+ The model was trained on a dataset consisting of PHP code samples collected from the-stack-smol dataset. The training data included code snippets from PHP repositories, forums, and online tutorials.
32
 
33
  ## Training procedure
34
 
35
+ **1. Data and Model Preparation:**
36
+
37
+ - Load the PHP dataset from my repository `bigcode/the-stack-smol`.
38
+ - Extract the relevant PHP data `data/php` samples for training.
39
+ - Utilize the `starcoder2-3b` model pre-trained on a diverse range of programming languages, including PHP, from the Hugging Face Hub.
40
+ - Ensure the model is configured with '4-bit' quantization for efficient computation.
41
+
42
+ **2. Data Processing:**
43
+
44
+ - Tokenize the PHP code snippets using the model's tokenizer.
45
+ - Clean the code by removing comments and normalizing indentation.
46
+ - Prepare input examples suitable for the model, considering its architecture and objectives.
47
+
48
+ **3. Training Configuration:**
49
+
50
+ - Initialize a Trainer object for fine-tuning, leveraging the Transformers library.
51
+ - Define training parameters, including:
52
+ - Learning rate, optimizer, and scheduler settings.
53
+ - Gradient accumulation steps to balance memory usage.
54
+ - Loss function, typically cross-entropy for language modeling.
55
+ - Metrics for evaluating model performance.
56
+ - Specify GPU utilization for accelerated training.
57
+ - Handle potential distributed training with multiple processes.
58
+
59
+ **4. Model Training:**
60
+
61
+ - Commence training for a specified number of steps.
62
+ - Iterate through batches of preprocessed PHP code examples.
63
+ - Feed examples into the model and compute predictions.
64
+ - Calculate loss based on predicted and actual outcomes.
65
+ - Update model weights by backpropagating gradients through the network.
66
+
67
+ **5. Evaluation (Optional):**
68
+
69
+ - Periodically assess the model's performance on a validation set.
70
+ - Measure key metrics such as code completion accuracy or perplexity.
71
+ - Monitor training progress to fine-tune hyperparameters if necessary.
72
+ - Use wandb metric monitoring for live monitoring.
73
+
74
+ **6. Save the Fine-tuned Model:**
75
+
76
+ - Store the optimized model weights and configuration in the designated `output_dir`.
77
+
78
+ **7. Model Sharing (Optional):**
79
+
80
+ - Optionally, create a model card documenting the fine-tuning process and model specifications.
81
+ - Share the finetunedPHP_starcoder2 model on the Hugging Face Hub for broader accessibility and collaboration.
82
+
83
  ### Training hyperparameters
84
 
85
  The following hyperparameters were used during training:
 
97
 
98
  ### Training results
99
 
100
+ Training results and performance metrics are present in the repo.
101
 
102
  ### Framework versions
103