Spaces:
Sleeping
Sleeping
File size: 753 Bytes
a2a2228 f4763bf a2a2228 a06d9e4 a2a2228 14292d6 a2a2228 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
#!/usr/bin/expect
# Set the timeout to 300 seconds (5 minutes)
set timeout 1200
# Start the llama-cli command with absolute paths
spawn /home/user/code/models/llama.cpp/llama-cli -c 12000 -m /home/user/code/models/xLAM-2-3B-fc-r-Q8_0.gguf --prompt-cache /home/user/code/models/context-xlam-2.gguf -f /home/user/code/models/system_prompt_xlam_2 -r "<|im_end|>" -no-cnv -sp -i --temp 0 --simple-io
# Wait for the expected output
expect {
"\}\]<|im_end|>" {
# Send Ctrl+C to terminate the command
send \x03
exp_continue
}
eof {
# Exit when the command ends
exit 0
}
timeout {
# Exit if the command takes too long
send_user "Timeout occurred. Exiting...\n"
exit 1
}
}
|