Skip to main content

swarms-torch - Pytorch

Project description

Multi-Modality

Swarms in Torch

Swarming algorithms like PSO, Ant Colony, Sakana, and more in PyTorch primitives😊

Installation

You can install the package using pip

pip3 install swarms-torch

Usage

  • We have just PSO now, but we're adding in ant colony and others!
from swarms_torch import ParticleSwarmOptimization

#test
pso = ParticleSwarmOptimization(goal="Attention is all you need", n_particles=100)
pso.optimize(iterations=1000)
  • Ant Colony Optimization
from swarms_torch.ant_colony_swarm import AntColonyOptimization

# Usage:
goal_string = "Hello ACO"
aco = AntColonyOptimization(goal_string, num_iterations=1000)
best_solution = aco.optimize()
print("Best Matched String:", best_solution)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarms_torch-0.0.3.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

swarms_torch-0.0.3-py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page