Week 02 Progress Report by Mebin J Thattil

~ Week 02 progress report goes live!
Also I'd recommend that you view these GSoC blogs on the SugarLabs website itself, as the markdown is written in the format their SSG uses. With that being said the content is the same in both places.~


Project: Speak Activity
Mentors: Chihurumnaya Ibiam, Kshitij Shah
Assisting Mentors: Walter Bender, Devin Ulibarri
Reporting Period: 2025-06-08 - 2025-06-14


Goals for This Week

This Week’s Achievements

  1. Setup AWS for Fine-Tuning
  2. Setup AWS SageMaker.
  3. Provisioned GPUs on AWS SageMaker to fine-tune Llama3-1B foundation model.

  4. Dataset & Cleaning

  5. Used an open dataset. It was a dataset about conversations between a student and a teacher.
  6. The dataset was cleaned and converted into a format that Llama needed for fine-tuning.
  7. Wrote a small script to convert the dataset into a format that Llama can understand.
  8. The dataset along with the script is available here.
  9. Fine-tuning
  10. Fine-tuned the model on a small set of the dataset, just to see how it performs and to get familar with AWS SageMaker.
  11. The training job ran on a ml.g5.2xlarge instance.
  12. The hyperparameters that were set so as to reduce memory footprint and mainly to test things. I'll list the hyperparameters, hoping this would serve as documentation for future fine-tuning.

Hyperparameters:

```
| Name                             | Value                                              |
|----------------------------------|----------------------------------------------------|
| add_input_output_demarcation_key | True                                               |
| chat_dataset                     | True                                               |
| chat_template                    | Llama3.1                                           |
| enable_fsdp                      | False                                              |
| epoch                            | 5                                                  |
| instruction_tuned                | False                                              |
| int8_quantization                | True                                               |
| learning_rate                    | 0.0001                                             |
| lora_alpha                       | 8                                                  |
| lora_dropout                     | 0.08                                               |
| lora_r                           | 2                                                  |
| max_input_length                 | -1                                                 |
| max_train_samples                | -1                                                 |
| max_val_samples                  | -1                                                 |
| per_device_eval_batch_size       | 1                                                  |
| per_device_train_batch_size      | 4                                                  |
| preprocessing_num_workers        | None                                               |
| sagemaker_container_log_level    | 20                                                 |
| sagemaker_job_name               | jumpstart-dft-meta-textgeneration-l-20250607-200133|
| sagemaker_program                | transfer_learning.py                               |
| sagemaker_region                 | ap-south-1                                         |
| sagemaker_submit_directory       | /opt/ml/input/data/code/sourcedir.tar.gz           |
| seed                             | 10                                                 |
| target_modules                   | q_proj,v_proj                                      |
| train_data_split_seed            | 0                                                  |
| validation_split_ratio           | 0.2                                                |
 ```
  1. Saving the model
  2. Deploying the model
  3. Testing the model

  4. Evaluation

Unexpected Model Output

Sample model output with stop condition

sample model output

Key Learnings

Next Week’s Roadmap

Acknowledgments

Thank you to my mentors, the Sugar Labs community, and fellow GSoC contributors for ongoing support.


Connect with Me




Powered Not An SSG 😎