You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-18Lines changed: 47 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
2
-
This is an experimental tree-based writing interface for GPT-3. The code is actively being developed and thus
2
+
This is an experimental tree-based writing interface for GPT-3. The code is actively being developed and thus
3
3
unstable and poorly documented.
4
4
5
5
# Features
@@ -8,33 +8,33 @@ unstable and poorly documented.
8
8
* Linear story view
9
9
* Tree nav bar
10
10
* Edit mode
11
-
12
-
11
+
12
+
13
13
* Tree view
14
14
* Explore tree visually with mouse
15
15
* Expand and collapse nodes
16
16
* Change tree topology
17
17
* Edit nodes in place
18
-
19
-
18
+
19
+
20
20
* Navigation
21
21
* Hotkeys
22
22
* Bookmarks
23
23
* Chapters
24
-
* 'Visited' state
25
-
24
+
* 'Visited' state
25
+
26
26
27
27
* Generation
28
28
* Generate N children with GPT-3
29
-
* Modify generation settings
29
+
* Modify generation settings
30
30
* Change hidden memory on a node-by-node basis
31
-
31
+
32
32
33
33
* File I/O
34
-
* Open/save trees as JSON files
34
+
* Open/save trees as JSON files
35
35
* Work with trees in multiple tabs
36
36
* Combine trees
37
-
37
+
38
38
39
39
# Demo
40
40
@@ -57,7 +57,7 @@ ooo what features! wow so cool
57
57
3.[Optional] Write ground truth continuation in the gray entry box at the bottom of the block multiverse interface. Blocks in ground truth trajectory will be colored black.
58
58
4. Set model and [params](https://generative.ink/meta/block-multiverse/#generation-parameters) in top bar.
59
59
5. Click `Propagate` to propagate plot the block multiverse
60
-
6. Click on any of the blocks to zoom ("[renormalize](https://generative.ink/meta/block-multiverse/#renormalization)") to that block
60
+
6. Click on any of the blocks to zoom ("[renormalize](https://generative.ink/meta/block-multiverse/#renormalization)") to that block
61
61
7. Click `Propagate` again to plot future block multiverse starting from a renormalized frame
62
62
8. Click `Reset zoom` to reset zoom level to initial position
63
63
9. Click `Clear` to clear the block multiverse plot. Do this before generating a new block multiverse.
@@ -152,7 +152,7 @@ Click to split node: `Control-alt-click`
152
152
Goto node by id: `Control-shift-g`
153
153
154
154
155
-
### Organization
155
+
### Organization
156
156
157
157
Toggle bookmark: `b`, `Control-b`
158
158
@@ -246,16 +246,16 @@ Reset zoom: `Control-0`
246
246
247
247
# Instructions
248
248
249
-
## Python
249
+
## Linux
250
250
251
251
0. Make sure you have tkinter installed
252
252
253
253
```sudo apt-get install python3-tk```
254
254
1. Setup your python env (should be >= 3.9.13)
255
-
256
-
```python3 -m venv env```
255
+
256
+
```python3 -m venv env```
257
257
```source env/bin/activate```
258
-
1. Install requirements
258
+
1. Install requirements
259
259
260
260
```pip install -r requirements.txt```
261
261
2.[Optional] Set environmental variables for `OPENAI_API_KEY`, `GOOSEAI_API_KEY`, `AI21_API_KEY` (you can also use the settings options)
@@ -265,14 +265,43 @@ Reset zoom: `Control-0`
265
265
4. Load a json tree
266
266
5. Read :)
267
267
268
+
## Mac
269
+
1.`conda create -n pyloom python=3.10`
270
+
2.`conda activate pyloom`
271
+
3.`pip install -r requirements-mac.txt`
272
+
4. set the OPENAI_API_KEY env variable
273
+
5.`python main.py`
274
+
268
275
## Docker
269
276
270
277
(Only tested on Linux.)
271
278
272
279
0.[Optional] Edit the Makefile with your API keys (you can also use the settings options)
273
280
1. Run the make targets
274
-
281
+
275
282
```make build```
276
283
```make run```
277
284
2. Load a json tree
278
285
3. Read :)
286
+
287
+
# Local Inference with llama-cpp-python
288
+
[llama.cpp](https://github.com/ggerganov/llama.cpp) lets you run models locally, and is especially useful for running models on Mac. [https://github.com/abetlen/llama-cpp-python] provides nice installation and a convenient API.
2. Set your preferred backend before installing `llama-cpp-python`, as per [these instructions](https://github.com/abetlen/llama-cpp-python?tab=readme-ov-file#supported-backends). For instance, to infer on MPS: `CMAKE_ARGS="-DLLAMA_METAL=on"`
293
+
3.`pip install 'llama-cpp-python[server]'`
294
+
4.`pip install huggingface-hub`
295
+
5. Now you can run the server with whatever .gguf model you desire from Huggingface, i.e: `python3 -m llama_cpp.server --hf_model_repo_id NousResearch/Meta-Llama-3-8B-GGUF --model 'Meta-Llama-3-8B-Q4_5_M.gguf' --port 8009`
296
+
297
+
## Inference
298
+
1.`conda activate llama-cpp-local` and start your llama-cpp-python server.
299
+
2. In a new terminal window, activate your `pyloom` environment and run `main.py`
300
+
2. Enter configurations for your local model in Settings > Model config > Add model. By default, the llama-cpp-port-8009 model uses the following settings:
0 commit comments