LLAMP - Large Language Model for Planning and Acting
Project description
LLamp - Large Languge Models for Planning
This is a package that uses LLMs (closed and open-source) for planning.
Pre-requisites:
- Python3.9
- (recommended) virtualenv
Installation:
pip install -r requirements.txtalfworld-downloadpip install -e .(this installs llamp)
Exporting API Keys:
export OPENAI_API_KEY=""export CEREBRAS_API_KEY=""- ... (and so on for all the providers you want to use, e.g. Anthropic, Nvidia, Cohere)
Testing everything works:
- Basic test:
cd test
./test.sh
- More advanced test:
cd root_folder
./playgrounds/run_alfworld_eval.sh test_ours
Running Evaluation
- Running Eval:
cd root_folder
./playgrounds/run_alfworld_eval.sh cerebras_main
Creating Conda Env: (Note this might be work in progress)
conda env create -f environment_stateact.yml -n env_name
Webshop, Run from Docker:
docker container run -p 3000:3000 ainikolai/webshop:latest
Previous README (currently being archived and refactored.)
WARNING PACKAGE IS STILL UNDER DEVELOPMENT and requirements needs cleaning up.
Installation:
- Textworld Game (pip install textworld)
- Textworld Visualisation (pip install -r requirements_textworld_visualisation.txt)
- (install chromedriver or firefox driver)
Playgame:
The following is accepted:
python3 playgrounds/playground_tw_gym.py {human/openai/...} --custom/--simple {PARAMS}
e.g.:
python3 playgrounds/playground_tw_gym.py human --custom 1 2 2
Or:
- (In terminal with browser visualiser)
tw-play tw_games/first_game.z8 --viewer - (as Gym environement in terminal)
python3 playgrounds/playground_tw_gym.py
Generate New Textworld games using helper script
python3 generate_games.py --simple/--custom {PARAMS}
e.g.
python3 generate_games.py --custom 2 2 2 1234
Generate New Textworld games using TW
-
tw-make custom --world-size 2 --nb-objects 10 --quest-length 5 --seed 1234 --output games/tw_games/w2_o10_l5_game.z8 -
tw-make tw-simple --rewards dense --goal detailed --seed 1234 --output games/tw_games/simple/r_dense__g_detailed__seed_1234.z8
Rewards: (dense, balanced, sparse) Goal: (detailed, brief, none)
Reference: [https://textworld.readthedocs.io/en/stable/tw-make.html#types-of-game-to-create]
Available Commands to agent:
Available commands:
look: describe the current room
goal: print the goal of this game
inventory: print player's inventory
go <dir>: move the player north, east, south or west
examine ...: examine something more closely
eat ...: eat edible food
open ...: open a door or a container
close ...: close a door or a container
drop ...: drop an object on the floor
take ...: take an object that is on the floor
put ... on ...: place an object on a supporter
take ... from ...: take an object from a container or a supporter
insert ... into ...: place an object into a container
lock ... with ...: lock a door or a container with a key
unlock ... with ...: unlock a door or a container with a key
Running jupyter notebooks in your own environment:
- [https://medium.com/@WamiqRaza/how-to-create-virtual-environment-jupyter-kernel-python-6836b50f4bf4]
pip install ipython
pip install ipykernel
ipython kernel install --user --name=myenv
python -m ipykernel install --user --name=myenv
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llamp-0.0.6.tar.gz.
File metadata
- Download URL: llamp-0.0.6.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7787c7a7b1d4b264973df6e05ecebe3db8c1ee39f42cc333b3e51eac38100f52
|
|
| MD5 |
4422e1834c72f9ed869bbb3be8fb4e82
|
|
| BLAKE2b-256 |
5bc64a1d696f1d5018218fd8c7df1cae11dda23c1b0a5d443c746184e448b919
|
File details
Details for the file llamp-0.0.6-py3-none-any.whl.
File metadata
- Download URL: llamp-0.0.6-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
967e9eebce56ef67da8e8c549e27dc1d6fc7efc724a1a473113d0920418dd1d7
|
|
| MD5 |
e23bc53d2f5243ef015bc1ef8e2ba805
|
|
| BLAKE2b-256 |
198edf65fa4431ca33ddc92ee4da084537ce3dfcf3764d18771567e5825707b6
|