arvindkaphley commited on
Commit
f62bbdd
·
verified ·
1 Parent(s): afdedf7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -0
README.md CHANGED
@@ -36,6 +36,37 @@ Ruby Code Generator is a versatile tool crafted to streamline the interaction be
36
 
37
  ## Training procedure
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  ### Training hyperparameters
40
 
41
  The following hyperparameters were used during training:
 
36
 
37
  ## Training procedure
38
 
39
+ **1. Load Dataset and Model:**
40
+ - Load the bigcode/the-stack-smol dataset using the Hugging Face Datasets library.
41
+ - Filter for the specified subset (data/ruby) and split (train).
42
+ - Load the bigcode/starcoder2-3b model from the Hugging Face Hub with '4-bit' quantization.
43
+ **2. Data Preprocessing:**
44
+ - Tokenize the code text using the appropriate tokenizer for the chosen model.
45
+ - Apply necessary cleaning or normalization (e.g., removing comments, handling indentation).
46
+ - Create input examples suitable for the model's architecture (e.g., with masked language modeling objectives).
47
+ **3. Configure Training:**
48
+ - Initialize a Trainer object (likely from a library like Transformers).
49
+ - Set training arguments based on the provided args:
50
+ - Learning rate, optimizer, scheduler
51
+ - Gradient accumulation steps
52
+ - Weight decay
53
+ - Loss function (likely cross-entropy)
54
+ - Evaluation metrics (e.g., accuracy, perplexity)
55
+ - Device placement (GPU/TPU)
56
+ - Number of processes for potential distributed training
57
+
58
+ **4. Train the Model:**
59
+
60
+ - Start the training loop for the specified max_steps.
61
+ - Iterate through batches of preprocessed code examples.
62
+ - Forward pass through the model to generate predictions.
63
+ - Calculate loss based on ground truth and predictions.
64
+ - Backpropagate gradients to update model parameters.
65
+
66
+ **6. Save the Fine-tuned Model:**
67
+
68
+ - Save the model's weights and configuration to the output_dir.
69
+
70
  ### Training hyperparameters
71
 
72
  The following hyperparameters were used during training: