RichardErkhov commited on
Commit
eb8669e
·
verified ·
1 Parent(s): a8718f9

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +87 -0
README.md ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ octopus-planning - AWQ
11
+ - Model creator: https://huggingface.co/NexaAIDev/
12
+ - Original model: https://huggingface.co/NexaAIDev/octopus-planning/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ license: cc-by-nc-4.0
20
+ ---
21
+ # Octo-planner: On-device Language Model for Planner-Action Agents Framework
22
+
23
+ We're thrilled to introduce the Octo-planner, the latest breakthrough in on-device language models from Nexa AI. Developed for the Planner-Action Agents Framework, Octo-planner enables rapid and efficient planning without the need for cloud connectivity, this model together with [Octopus-V2](https://huggingface.co/NexaAIDev/Octopus-v2) can work on edge devices locally to support AI Agent usages.
24
+
25
+ ### Key Features of Octo-planner:
26
+ - **Efficient Planning**: Utilizes fine-tuned plan model based on Phi-3 Mini (3.82 billion parameters) for high efficiency and low power consumption.
27
+ - **Agent Framework**: Separates planning and action, allowing for specialized optimization and improved scalability.
28
+ - **Enhanced Accuracy**: Achieves a planning success rate of 98.1% on benchmark dataset, providing reliable and effective performance.
29
+ - **On-device Operation**: Designed for edge devices, ensuring fast response times and enhanced privacy by processing data locally.
30
+
31
+
32
+ ## Example Usage
33
+ Below is a demo of Octo-planner:
34
+ <p align="center" width="100%">
35
+ <a><img src="1-demo.png" alt="ondevice" style="width: 80%; min-width: 300px; display: block; margin: auto;"></a>
36
+ </p>
37
+
38
+
39
+ Run below code to use Octopus Planner for a given question:
40
+ ```python
41
+ import torch
42
+ from transformers import AutoModelForCausalLM, AutoTokenizer
43
+
44
+ model_id = "NexaAIDev/octopus-planning"
45
+ model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)
46
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
47
+
48
+ question = "Find my presentation for tomorrow's meeting, connect to the conference room projector via Bluetooth, increase the screen brightness, take a screenshot of the final summary slide, and email it to all participants"
49
+ inputs = f"<|user|>{question}<|end|><|assistant|>"
50
+ input_ids = tokenizer(inputs, return_tensors="pt").to(model.device)
51
+ outputs = model.generate(
52
+ input_ids=input_ids["input_ids"],
53
+ max_length=1024,
54
+ do_sample=False)
55
+ res = tokenizer.decode(outputs.tolist()[0])
56
+ print(f"=== inference result ===\n{res}")
57
+ ```
58
+
59
+ ## Training Data
60
+ We wrote 10 Android API descriptions to used to train the models, see this file for details. Below is one Android API description example
61
+ ```
62
+ def send_email(recipient, title, content):
63
+ """
64
+ Sends an email to a specified recipient with a given title and content.
65
+
66
+ Parameters:
67
+ - recipient (str): The email address of the recipient.
68
+ - title (str): The subject line of the email. This is a brief summary or title of the email's purpose or content.
69
+ - content (str): The main body text of the email. It contains the primary message, information, or content that is intended to be communicated to the recipient.
70
+ """
71
+ ```
72
+
73
+ ## Contact Us
74
+ For support or to provide feedback, please [contact us](mailto:[email protected]).
75
+
76
+ ## License and Citation
77
+ Refer to our [license page](https://www.nexa4ai.com/licenses/v2) for usage details. Please cite our work using the below reference for any academic or research purposes.
78
+ ```
79
+ @article{chen2024octoplannerondevicelanguagemodel,
80
+ title={Octo-planner: On-device Language Model for Planner-Action Agents},
81
+ author={Wei Chen and Zhiyuan Li and Zhen Guo and Yikang Shen},
82
+ year={2024},
83
+ eprint={2406.18082},
84
+ url={https://arxiv.org/abs/2406.18082},
85
+ }
86
+ ```
87
+