{"id":25264339,"url":"https://github.com/samadpls/sentimentfinetuning","last_synced_at":"2025-04-06T01:30:22.466Z","repository":{"id":242340144,"uuid":"809300326","full_name":"samadpls/SentimentFineTuning","owner":"samadpls","description":"Efficient fine-tuned large language model (LLM) for the task of sentiment analysis using the IMDB dataset. ","archived":false,"fork":false,"pushed_at":"2024-06-03T08:11:26.000Z","size":8,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T07:49:34.230Z","etag":null,"topics":["finetuning","huggingface","llm","low-rank-adaptation","opensource","sentiment-analysis","transformer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samadpls.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-02T09:54:51.000Z","updated_at":"2025-01-31T00:26:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"797ecad3-7a37-49c6-9b06-827eaa3f8c00","html_url":"https://github.com/samadpls/SentimentFineTuning","commit_stats":null,"previous_names":["samadpls/sentimentfinetuning"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samadpls%2FSentimentFineTuning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samadpls%2FSentimentFineTuning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samadpls%2FSentimentFineTuning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samadpls%2FSentimentFineTuning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samadpls","download_url":"https://codeload.github.com/samadpls/SentimentFineTuning/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423458,"owners_count":20936620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finetuning","huggingface","llm","low-rank-adaptation","opensource","sentiment-analysis","transformer"],"created_at":"2025-02-12T07:36:35.112Z","updated_at":"2025-04-06T01:30:22.459Z","avatar_url":"https://github.com/samadpls.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fine-Tuning LLM for Sentiment Analysis\n\n\u003cimg src='https://github.com/samadpls/SentimentFineTuning/assets/94792103/804a99db-becc-41d1-a356-64d292dc1985' align=right height=200px\u003e\n\nThis repository includes the steps I took to fine-tune a large language model (LLM) for sentiment analysis using the IMDB dataset. The process leverages Hugging Face's `transformers` and `datasets` libraries, as well as the `peft` library for parameter-efficient fine-tuning using LoRA (Low-Rank Adaptation).\n\nThe fine-tuned sentiment analysis model can be found on Hugging Face at: [samadpls/sentiment-analysis](https://huggingface.co/samadpls/sentiment-analysis).\n\n## Model\n\nWe use the `distilbert-base-uncased` model as the base model for fine-tuning. The model is configured for sequence classification with two labels (positive and negative sentiment).\n\n## LoRA Configuration\n\nLoRA (Low-Rank Adaptation) is used to fine-tune the model efficiently by adding trainable low-rank adaptation matrices to certain model layers. The configuration parameters for LoRA used in this project are:\n\nBy leveraging LoRA, we achieve efficient fine-tuning with reduced computational resources, making it a key component of this project.\n\n## Evaluation\n\nThe model's performance is evaluated using accuracy as the metric. The trained model is tested on a set of example texts to verify its predictions.\n\n## Conclusion\n\nI developed this project in 2023 while learning to run and fine-tune LLMs. This project serves as a starting point for fine-tuning LLMs. Using LoRA, we can efficiently fine-tune large models with reduced computational resources. Feel free to experiment with various models, datasets, and configurations to enhance your understanding and achieve better results.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamadpls%2Fsentimentfinetuning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamadpls%2Fsentimentfinetuning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamadpls%2Fsentimentfinetuning/lists"}