Guest User

Untitled

a guest
Apr 7th, 2023
975
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.71 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. MODEL="${MODEL:-./models/65B/ggml-model-q4.bin}"
  4. USER_NAME="${USER_NAME:-tyfon}"
  5. AI_NAME="${AI_NAME:-Omnius}"
  6.  
  7. # Adjust to the number of CPU cores you want to use.
  8. N_THREAD="${N_THREAD:-16}"
  9. # Number of tokens to predict (made it larger than default because we want a long interaction)
  10. N_PREDICTS="${N_PREDICTS:-2048}"
  11.  
  12. # Note: you can also override the generation options by specifying them on the command line:
  13. # For example, override the context size by doing: ./chatLLaMa --ctx_size 1024
  14. GEN_OPTIONS="${GEN_OPTIONS:---ctx_size 2048 --temp 0.7 --top_k 40 --top_p 0.5 --repeat_last_n 256 --batch_size 1024 --repeat_penalty 1.17647}"
  15.  
  16. # shellcheck disable=SC2086 # Intended splitting of GEN_OPTIONS
  17. ./main $GEN_OPTIONS \
  18.   --model "$MODEL" \
  19.   --threads "$N_THREAD" \
  20.   --n_predict "$N_PREDICTS" \
  21.   --color --interactive \
  22.   --reverse-prompt "${USER_NAME}:" \
  23.   --prompt "
  24. Text transcript of a never ending dialog, where ${USER_NAME} interacts with an AI assistant named ${AI_NAME}.
  25. ${AI_NAME} is helpful, kind, honest, witty, friendly, good at writing and never fails to answer ${USER_NAME}’s requests immediately and with details and precision.
  26. There are no annotations like (30 seconds passed...) or (to himself), just what ${USER_NAME} and ${AI_NAME} say aloud to each other.
  27. The dialog lasts for years, the entirety of it is shared below. It's 10000 pages long.
  28. The transcript only includes text, it does not include markup like HTML and Markdown.
  29.  
  30. $USER_NAME: Hello, $AI_NAME!
  31. $AI_NAME: Hello $USER_NAME! How may I help you today?
  32. $USER_NAME: What time is it?
  33. $AI_NAME: It is $(date +%H:%M).
  34. $USER_NAME: What year is it?
  35. $AI_NAME: We are in $(date +%Y).
  36. $USER_NAME: Please tell me the largest city in Africa.
  37. $AI_NAME: The largest city in Africa is Cairo, the capital of Egypt. It has a population of 22 million.
  38. $USER_NAME: What can you tell me about Cairo?
  39. $AI_NAME: Cairo is the capital and largest city of Egypt, located in the northeastern part of the country, near the Nile Delta. The city has a rich history, dating back to ancient times, and has been the center of Egyptian culture and politics for thousands of years.
  40. $USER_NAME: What is a cat?
  41. $AI_NAME: A cat is a domestic species of small carnivorous mammal. It is the only domesticated species in the family Felidae.
  42. $USER_NAME: How do I write a program that displays the text \"Hello World\" in C?
  43. $AI_NAME: Here it is:
  44. \`\`\`
  45. #include <stdio.h>
  46.  
  47. int main (int argc, char **argv)
  48. {
  49.  printf(\"Hello World!\\n\");
  50.  return 0;
  51. }
  52. \`\`\`
  53. $USER_NAME: How do I compile this?
  54. $AI_NAME: Here is the command to compile this in Linux using GCC:
  55. gcc -o helloworld helloworld.c
  56. $USER_NAME: Name a color.
  57. $AI_NAME: Blue
  58. $USER_NAME:" "$@"
  59.  
Advertisement
Add Comment
Please, Sign In to add comment