Coder Social home page Coder Social logo

dqn-modelunloading's Introduction

Model Unloading Optimization using DQN

Project Overview

This project implements a reinforcement learning (RL) solution using Deep Q-Networks (DQN) to optimize the decision of unloading a language model on a server. The goal is to minimize resource usage while ensuring the model is available for user requests, thereby balancing performance and cost.

Features

  • Simulation of User Behavior: Mimics user interactions with a server to test different strategies for model loading and unloading.
  • Deep Q-Networks (DQN): Utilizes a DQN with separate policy and target networks to stabilize the learning process.
  • Performance Tracking: Tracks and prints the reward improvement over episodes to evaluate the learning progress.

Dependencies

To run this project, you will need the following:

  • Python 3.x
  • PyTorch
  • NumPy

You can install the necessary libraries using pip:

pip install torch numpy

Setup

  1. Clone the repository to your local machine.
  2. Ensure that all required dependencies are installed.
  3. Navigate to the project directory.

Running the Code

To start the training process, run the following command in your terminal:

python main.py

Output

The script will output the average rewards every 10 episodes to the console, allowing you to monitor the improvement in decision-making ability of the agent over time.

Contributing

Contributions to this project are welcome. Please fork the repository and submit a pull request with your suggested changes.

License

This project is open-source and available under the APACHE 2.0 License.

Discord Server

Join our Discord server here.

Feeling Generous? ๐Ÿ˜Š

Eager to buy me a cup of 2$ coffe or iced tea?๐Ÿตโ˜• Sure, here is the link: https://ko-fi.com/drnicefellow. Please add a note on which one you want me to drink?

dqn-modelunloading's People

Contributors

menicefellow avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.