Sayan18 commited on
Commit
5b3182e
1 Parent(s): a3fe5ef

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +49 -2
README.md CHANGED
@@ -18,11 +18,12 @@ should probably proofread and complete it, then remove this comment. -->
18
 
19
  # finetune_starcoder2
20
 
21
- This model is a fine-tuned version of [bigcode/starcoder2-3b](https://huggingface.co/bigcode/starcoder2-3b) on an unknown dataset.
22
 
23
  ## Model description
24
 
25
- More information needed
 
26
 
27
  ## Intended uses & limitations
28
 
@@ -34,6 +35,52 @@ More information needed
34
 
35
  ## Training procedure
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  ### Training hyperparameters
38
 
39
  The following hyperparameters were used during training:
 
18
 
19
  # finetune_starcoder2
20
 
21
+ 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).
22
 
23
  ## Model description
24
 
25
+ This fine-tuned model builds upon the `bigcode/starcoder2-3b` base model, further specializing it for code completion tasks using the rich `bigcode/the-stack-smol` dataset on SQL data. This dataset focuses on code snippets and solutions, allowing the model to suggest relevant completions and potentially even generate code based on your prompts.
26
+
27
 
28
  ## Intended uses & limitations
29
 
 
35
 
36
  ## Training procedure
37
 
38
+ **1. Load Dataset and Model:**
39
+
40
+ - Load the `bigcode/the-stack-smol` dataset using the Hugging Face Datasets library.
41
+ - Filter for the specified subset (`data/sql`) and split (`train`).
42
+ - Load the `bigcode/starcoder2-3b` model from the Hugging Face Hub with '4-bit' quantization.
43
+
44
+ **2. Preprocess Data:**
45
+
46
+ - Tokenize the code text using the appropriate tokenizer for the chosen model.
47
+ - Apply necessary cleaning or normalization (e.g., removing comments, handling indentation).
48
+ - Create input examples suitable for the model's architecture (e.g., with masked language modeling objectives).
49
+
50
+ **3. Configure Training:**
51
+
52
+ - Initialize a Trainer object (likely from a library like Transformers).
53
+ - Set training arguments based on the provided `args`:
54
+ - Learning rate, optimizer, scheduler
55
+ - Gradient accumulation steps
56
+ - Weight decay
57
+ - Loss function (likely cross-entropy)
58
+ - Evaluation metrics (e.g., accuracy, perplexity)
59
+ - Device placement (GPU/TPU)
60
+ - Number of processes for potential distributed training
61
+
62
+ **4. Train the Model:**
63
+
64
+ - Start the training loop for the specified `max_steps`.
65
+ - Iterate through batches of preprocessed code examples.
66
+ - Forward pass through the model to generate predictions.
67
+ - Calculate loss based on ground truth and predictions.
68
+ - Backpropagate gradients to update model parameters.
69
+
70
+ **5. Evaluation (Optional):**
71
+
72
+ - Periodically evaluate model performance on a validation or test set.
73
+ - Calculate relevant metrics (accuracy, perplexity, code completion accuracy).
74
+ - Monitor training progress and adjust hyperparameters as needed.
75
+
76
+ **6. Save the Fine-tuned Model:**
77
+
78
+ - Save the model's weights and configuration to the `output_dir`.
79
+
80
+ **7. Push to Hugging Face Hub (Optional):**
81
+
82
+ - If `push_to_hub` is True, create a model card and push the model to Hugging Face Hub for sharing and use.
83
+
84
  ### Training hyperparameters
85
 
86
  The following hyperparameters were used during training: