llmixer commited on
Commit
45b08ee
β€’
1 Parent(s): dc13cd1

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -0
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - control vectors
5
+ - exllamav2
6
+ - creative writing
7
+ - text generation
8
+ - inference
9
+ - model integration
10
+ ---
11
+ # Creative Writing Control Vectors Integration for ExLlamaV2
12
+
13
+ This project provides a wrapper to integrate [jukofyork's creative writing control vectors](https://huggingface.co/jukofyork/creative-writing-control-vectors-v3.0) with [ExLlamaV2](https://github.com/turboderp/exllamav2/). While ExLlamaV2 does not natively support control vectors, this wrapper enables loading and injecting GGUF control vectors into the model for dynamic text generation control.
14
+
15
+ ## Overview
16
+
17
+ - Wrapper for using control vectors with ExLlamaV2
18
+ - Supports loading control vectors from GGUF format
19
+ - Injects vectors directly into ExLlamaV2 inference
20
+ - Enables dynamic text generation control
21
+
22
+
23
+ - Wrapper for using control vectors with ExLlamaV2
24
+ - Supports loading control vectors from GGUF format
25
+ - Injects vectors directly into ExLlamaV2 inference
26
+ - Enables dynamic text generation control
27
+
28
+ ## Usage
29
+
30
+ 1. Download model in ExLlamaV2 format
31
+ 2. Create a "-vectors" directory next to model directory
32
+ 3. Download the control vectors from [jukofyork's repository](https://huggingface.co/jukofyork/creative-writing-control-vectors-v3.0) and place them in the "-vectors" directory.
33
+ 4. Run inference with the `--control_vectors` (`-vc`) parameter.
34
+
35
+ Example command:
36
+ ```bash
37
+ python test_inference.py -m Meta-Llama-3-70B-Instruct-8bpw \
38
+ -p "<prompt>" \
39
+ --control_vectors language:simple:0.5,optimism:optimism:0.5
40
+ ```
41
+
42
+ ## Directory Structure
43
+
44
+ Ensure your directory structure follows this format to correctly load the control vectors:
45
+
46
+ ```
47
+ models/
48
+ β”œβ”€β”€ Meta-Llama-3-70B-Instruct-8bpw/
49
+ β”‚ └── model files...
50
+ └── Meta-Llama-3-70B-Instruct-8bpw-vectors/
51
+ β”œβ”€β”€ llama-3:70b-language__debias.gguf
52
+ β”œβ”€β”€ llama-3:70b-language__simple.gguf
53
+ β”œβ”€β”€ llama-3:70b-language__ornate.gguf
54
+ └── ...
55
+ ```
56
+
57
+ ## Limitations
58
+
59
+ - Proof of concept implementation
60
+ - May impact model performance
61
+ - Limited testing with different vector combinations
62
+ - No guarantee of exact equivalence to llama.cpp behavior
63
+
64
+ ## Acknowledgments
65
+
66
+ - Control vectors from [jukofyork's creative-writing-control-vectors-v3.0](https://huggingface.co/jukofyork/creative-writing-control-vectors-v3.0)
67
+ - [ExLlamaV2 by turboderp](https://github.com/turboderp/exllamav2/)