psylink
1.0.0
แบ็กเอนด์และโปรโตคอลขั้นต่ำสำหรับการแจกจ่าย LLM ในท้องถิ่น สร้างขึ้นโดยใช้ Llama CPP สำหรับ Python และ Redis
┌────────┐ ┌────────────────┐
│ Client ├──────┐ ┌─────┤ Psylink Worker │
└────────┘ │ ┌──────────────────────────────┐ │ └────────────────┘
└──┤ ├──┘
┌────────┐ │ Redis Message Broker Server │ ┌────────────────┐
│ Client ├─────────┤ ├────────┤ Psylink Worker │
└────────┘ ├──────────────────────────────┤ └────────────────┘
│ │
┌────────┐ │ Prompt Input/ Output Queues │ ┌────────────────┐
│ Client ├─────────┤ ├────────┤ Psylink Worker │
└────────┘ │ Command Input/ Output Queues │ └────────────────┘
┌───┤ ├──┐
┌────────┐ │ └──────────────────────────────┘ │ ┌────────────────┐
│ Client ├─────┘ └─────┤ Psylink Worker │
└────────┘ └────────────────┘
สร้างสภาพแวดล้อมเสมือนจริงและดำเนินการ
pip install -r requirements.txt
ในการติดตั้งแพ็คเกจ Python ที่ต้องการ
รูปแบบข้อความคิวไคลเอ็นต์อินพุต:
{
"message_id" : str ,
"client_id" : str ,
"priority" : int ,
"input" : str ,
"timestamp" : int
}รูปแบบข้อความคิวคำสั่งไคลเอนต์:
{
"message_id" : str ,
"client_id" : str ,
"worker_id" : str ,
"input" : {
"command" : str ,
"args" : dict | None
},
"timestamp" : int
}รูปแบบข้อความคิวเอาต์พุตคนงาน:
{
"message_id" : str ,
"client_id" : str ,
"worker_id" : str ,
"input" : str ,
"output" : str ,
"timestamp" : int
}ตัวอย่าง config.toml:
[ redis ]
host = " localhost "
port = 6379
password = " supersecretpassword "
db = 0
prompt_input_queue = " psy_prompt_input_queue "
prompt_output_queue = " psy_prompt_output_queue "
command_input_queue = " psy_command_input_queue "
command_output_queue = " psy_command_output_queue "
[ model ]
model_path = " models/codellama-13b-instruct.Q8_0.gguf "
[ llama_params ]
max_tokens = 32
echo = true
temperature = 0.85
[ properties ]
min_priority = 1
max_priority = 5