RobbiePasquale
commited on
Commit
•
f2f9590
1
Parent(s):
49c8cb6
Update README.md
Browse files
README.md
CHANGED
@@ -42,7 +42,7 @@ LightBulb provides six primary functionalities, each accessible via the `main_me
|
|
42 |
Trains an autonomous web search agent that navigates the web, gathers relevant content, and learns to summarize and generate responses based on user queries.
|
43 |
## Overview of the AutonomousWebAgent
|
44 |
|
45 |
-
The AutonomousWebAgent is a
|
46 |
|
47 |
### Key Components
|
48 |
|
@@ -118,10 +118,10 @@ python main_menu.py --task test_agent
|
|
118 |
python main_menu.py --task test_agent --query "Your query here"
|
119 |
```
|
120 |
|
121 |
-
### 3. Train
|
122 |
|
123 |
**Description:**
|
124 |
-
Trains a Language Model
|
125 |
|
126 |
### Training Procedure
|
127 |
- **Data Loading**: The data is tokenized and prepared with attention to padding and truncation. Text data is grouped into sequences of fixed length for efficient training.
|
@@ -140,7 +140,7 @@ python main_menu.py --task train_llm_world --model_name gpt2 --dataset_name wiki
|
|
140 |
- `--batch_size`: Number of samples per batch.
|
141 |
- `--max_length`: Maximum sequence length.
|
142 |
|
143 |
-
### 4. Inference Using Language Model
|
144 |
|
145 |
**Description:**
|
146 |
Generates responses using the trained language model, leveraging multi-token prediction, beam search, and MCTS for enhanced coherence and strategic reasoning.
|
@@ -155,7 +155,7 @@ python main_menu.py --task inference_llm --query "Your query here"
|
|
155 |
2. **Beam Search:** Maintains multiple candidate sequences to ensure diverse and high-quality outputs.
|
156 |
3. **MCTS Integration:** Uses MCTS to evaluate and select the most promising token sequences based on policy and value estimates.
|
157 |
|
158 |
-
### 5. Train
|
159 |
|
160 |
**Description:**
|
161 |
Develops a comprehensive World Model that encapsulates state representations, dynamics, and prediction networks to simulate and predict state transitions within the Tree of Thought framework.
|
@@ -268,7 +268,6 @@ python main_menu.py --task inference_world_model --query "Your query here"
|
|
268 |
Executes inference using the World Model integrated with ToT and multi-token beam search for highly coherent and contextually rich outputs.
|
269 |
|
270 |
|
271 |
-
|
272 |
**Usage:**
|
273 |
```bash
|
274 |
python main_menu.py --task advanced_inference --query "Your complex query here"
|
@@ -528,9 +527,9 @@ graph TD
|
|
528 |
- `argparse`
|
529 |
- `huggingface_hub`
|
530 |
|
531 |
-
## Usage Examples
|
532 |
|
533 |
-
|
|
|
534 |
|
535 |
```bash
|
536 |
python main_menu.py --task train_llm_world --model_name gpt2 --dataset_name wikitext --num_epochs 5 --batch_size 8 --max_length 256
|
@@ -542,19 +541,19 @@ python main_menu.py --task train_llm_world --model_name gpt2 --dataset_name wiki
|
|
542 |
python main_menu.py --task train_agent
|
543 |
```
|
544 |
|
545 |
-
###
|
546 |
|
547 |
```bash
|
548 |
python main_menu.py --task test_agent
|
549 |
```
|
550 |
|
551 |
-
###
|
552 |
|
553 |
```bash
|
554 |
python main_menu.py --task test_agent --query "What are the impacts of renewable energy on global sustainability?"
|
555 |
```
|
556 |
|
557 |
-
###
|
558 |
|
559 |
```bash
|
560 |
python main_menu.py --task advanced_inference --query "Analyze the economic effects of artificial intelligence in the next decade."
|
|
|
42 |
Trains an autonomous web search agent that navigates the web, gathers relevant content, and learns to summarize and generate responses based on user queries.
|
43 |
## Overview of the AutonomousWebAgent
|
44 |
|
45 |
+
The AutonomousWebAgent is a multi-component search and retrieval agent designed to navigate the web, gather relevant content, and perform summarization and generation based on user queries. This agent integrates reinforcement learning (RL), Monte Carlo Tree Search (MCTS), a Retrieval Augmented Generation (RAG) Summarizer, and a Hierarchical Reinforcement Learning (HRL) architecture to select, execute, and optimize its actions based on past experiences.
|
46 |
|
47 |
### Key Components
|
48 |
|
|
|
118 |
python main_menu.py --task test_agent --query "Your query here"
|
119 |
```
|
120 |
|
121 |
+
### 3. Train Language Model
|
122 |
|
123 |
**Description:**
|
124 |
+
Trains a Language Model and World Model using datasets from Hugging Face, enabling the model to handle complex reasoning and long sequences.
|
125 |
|
126 |
### Training Procedure
|
127 |
- **Data Loading**: The data is tokenized and prepared with attention to padding and truncation. Text data is grouped into sequences of fixed length for efficient training.
|
|
|
140 |
- `--batch_size`: Number of samples per batch.
|
141 |
- `--max_length`: Maximum sequence length.
|
142 |
|
143 |
+
### 4. Inference Using Language Model
|
144 |
|
145 |
**Description:**
|
146 |
Generates responses using the trained language model, leveraging multi-token prediction, beam search, and MCTS for enhanced coherence and strategic reasoning.
|
|
|
155 |
2. **Beam Search:** Maintains multiple candidate sequences to ensure diverse and high-quality outputs.
|
156 |
3. **MCTS Integration:** Uses MCTS to evaluate and select the most promising token sequences based on policy and value estimates.
|
157 |
|
158 |
+
### 5. Train World Model
|
159 |
|
160 |
**Description:**
|
161 |
Develops a comprehensive World Model that encapsulates state representations, dynamics, and prediction networks to simulate and predict state transitions within the Tree of Thought framework.
|
|
|
268 |
Executes inference using the World Model integrated with ToT and multi-token beam search for highly coherent and contextually rich outputs.
|
269 |
|
270 |
|
|
|
271 |
**Usage:**
|
272 |
```bash
|
273 |
python main_menu.py --task advanced_inference --query "Your complex query here"
|
|
|
527 |
- `argparse`
|
528 |
- `huggingface_hub`
|
529 |
|
|
|
530 |
|
531 |
+
|
532 |
+
### Training the World Model
|
533 |
|
534 |
```bash
|
535 |
python main_menu.py --task train_llm_world --model_name gpt2 --dataset_name wikitext --num_epochs 5 --batch_size 8 --max_length 256
|
|
|
541 |
python main_menu.py --task train_agent
|
542 |
```
|
543 |
|
544 |
+
### Use the Web Search Agent in Interactive Mode
|
545 |
|
546 |
```bash
|
547 |
python main_menu.py --task test_agent
|
548 |
```
|
549 |
|
550 |
+
### Use the Web Search Agent with a Single Query
|
551 |
|
552 |
```bash
|
553 |
python main_menu.py --task test_agent --query "What are the impacts of renewable energy on global sustainability?"
|
554 |
```
|
555 |
|
556 |
+
### Inference with World Model and Tree of Thought
|
557 |
|
558 |
```bash
|
559 |
python main_menu.py --task advanced_inference --query "Analyze the economic effects of artificial intelligence in the next decade."
|