From 2a5c27053ea8149f7a87d0b7b8626dbe841bd015 Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Sat, 30 Sep 2023 16:35:28 +0100 Subject: [PATCH 01/21] Enable external file and add datestamp --- ParallelQuestions.txt | 32 ++++++++++++++++++++++++ cmake_all.sh | 6 +++++ common/common.cpp | 2 ++ common/common.h | 1 + examples/parallel/parallel.cpp | 45 +++++++++++++++++++++++++++++++--- 5 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 ParallelQuestions.txt create mode 100755 cmake_all.sh diff --git a/ParallelQuestions.txt b/ParallelQuestions.txt new file mode 100644 index 0000000000000..3f953faad8f9d --- /dev/null +++ b/ParallelQuestions.txt @@ -0,0 +1,32 @@ +What do you know about Hobbits? +What is quantum field theory? +Why did the chicken cross the road? +Who is the president of the United States? +How do I run CMake on MacOS? +Do you agree that C++ is a really finicky language compared with Python3? +Is it a good idea to invest in technology? +Do you like Wagner's Ring? +Do you think this file input option is really neat? +What should we all do about climate change? +Is time-travel possible within the laws of current physics? +Is it like anything to be a bat? +Once the chicken has crossed the road, does it try to go back? +Who is the greatest of all musical composers? +What is art? +Is there life elsewhere in the universe? +What is intelligence? +What is the difference between knowledge and intelligence? +Will religion ever die? +Do we understand ourselves? +What is the best way to cook eggs? +If you cannot see things, on what basis do you evaluate them? +What is belief? +Is professional sport a good or bad influence on human behaviour? +Is capital punishment immoral? +Should we care about other people? +Who am I? +Which sense would you surrender if you could? +Was Henry Ford a hero or a villain? +Do we need leaders? +What is nucleosynthesis? +Who is the greatest scientist of all time so far? \ No newline at end of file diff --git a/cmake_all.sh b/cmake_all.sh new file mode 100755 index 0000000000000..4b94a4eec513e --- /dev/null +++ b/cmake_all.sh @@ -0,0 +1,6 @@ +cd llama.cpp +rm -r build +cmake -B build +cd build +cmake --build . --config Release +cd .. \ No newline at end of file diff --git a/common/common.cpp b/common/common.cpp index ec181c6b3b61a..e0bf65cb2d652 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -167,6 +167,8 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) { invalid_param = true; break; } + // store the external file name in params + params.prompt_file = argv[i]; std::copy(std::istreambuf_iterator(file), std::istreambuf_iterator(), back_inserter(params.prompt)); if (params.prompt.back() == '\n') { params.prompt.pop_back(); diff --git a/common/common.h b/common/common.h index 0e2d3fa6c07d9..cb40fd365928d 100644 --- a/common/common.h +++ b/common/common.h @@ -79,6 +79,7 @@ struct gpt_params { std::string model_draft = ""; // draft model for speculative decoding std::string model_alias = "unknown"; // model alias std::string prompt = ""; + std::string prompt_file = ""; // store for external prompt file name std::string path_prompt_cache = ""; // path to file for saving/loading prompt eval state std::string input_prefix = ""; // string to prefix user inputs with std::string input_suffix = ""; // string to suffix user inputs with diff --git a/examples/parallel/parallel.cpp b/examples/parallel/parallel.cpp index 0434ded234b18..061fd3586c9cd 100644 --- a/examples/parallel/parallel.cpp +++ b/examples/parallel/parallel.cpp @@ -10,6 +10,8 @@ #include #include #include +#include +#include // trim whitespace from the beginning and end of a string static std::string trim(const std::string & str) { @@ -70,6 +72,22 @@ struct client { std::vector tokens_prev; }; +static void printDateTime() { + std::time_t currentTime = std::time(nullptr); + std::cout << "\n\033[35mRUN PARAMETERS as at \033[0m" << std::ctime(¤tTime); +} + +// Define a split string function to ... +static std::vector splitString(const std::string& input, char delimiter) { + std::vector tokens; + std::istringstream stream(input); + std::string token; + while (std::getline(stream, token, delimiter)) { + tokens.push_back(token); + } + return tokens; +} + int main(int argc, char ** argv) { srand(1234); @@ -104,6 +122,23 @@ int main(int argc, char ** argv) { params.logits_all = true; std::tie(model, ctx) = llama_init_from_gpt_params(params); + // load the prompts from an external file if there are any + if (params.prompt.empty()) { + std::cout << "\n\033[32mNo new questions so proceed with build-in defaults.\033[0m"; + } else { + // Output each line of the input params.prompts vector and copy to k_prompts + int index = 0; + std::cout << "\n\033[32mNow printing the external prompt file " << params.prompt_file << "\033[0m\n\n"; + + std::vector prompts = splitString(params.prompt, '\n'); + for (const auto& prompt : prompts) { + k_prompts.resize(index + 1); + k_prompts[index] = prompt; + index++; + std::cout << std::setw(3) << std::right << index << " prompt: " << prompt << std::endl; + } + } + fprintf(stderr, "\n\n"); fflush(stderr); @@ -336,8 +371,8 @@ int main(int argc, char ** argv) { const auto t_main_end = ggml_time_us(); - LOG_TEE("\033[1mClient %3d, seq %4d, prompt %4d t, response %4d t, time %5.2f s, speed %5.2f t/s, cache miss %d \033[0m \n\nInput: %s\nResponse: %s\n\n", - client.id, client.seq_id, client.n_prompt, client.n_decoded, + LOG_TEE("\033[31mClient %3d, seq %3d/%3d, prompt %4d t, response %4d t, time %5.2f s, speed %5.2f t/s, cache miss %d \033[0m \nInput: %s\n\033[35mResponse: %s\033[0m\n\n", + client.id, client.seq_id, n_seq, client.n_prompt, client.n_decoded, (t_main_end - client.t_start_prompt) / 1e6, (double) (client.n_prompt + client.n_decoded) / (t_main_end - client.t_start_prompt) * 1e6, n_cache_miss, @@ -357,7 +392,11 @@ int main(int argc, char ** argv) { const auto t_main_end = ggml_time_us(); - LOG_TEE("\n\n"); + printDateTime(); + + LOG_TEE("\n%s: n_parallel = %d, n_sequences = %d, cont_batching = %d, system tokens = %d\n", __func__, n_clients, n_seq, cont_batching, n_tokens_system); + LOG_TEE("\n"); + LOG_TEE("Total prompt tokens: %6d, speed: %5.2f t/s\n", n_total_prompt, (double) (n_total_prompt ) / (t_main_end - t_main_start) * 1e6); LOG_TEE("Total gen tokens: %6d, speed: %5.2f t/s\n", n_total_gen, (double) (n_total_gen ) / (t_main_end - t_main_start) * 1e6); LOG_TEE("Total speed (AVG): %6s speed: %5.2f t/s\n", "", (double) (n_total_prompt + n_total_gen) / (t_main_end - t_main_start) * 1e6); From f71068fd98837792735c34fd5d390ed6f04b5576 Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Sat, 30 Sep 2023 17:07:31 +0100 Subject: [PATCH 02/21] Add name of external file at end --- ParallelQuestions.txt | 4 ++-- examples/parallel/parallel.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ParallelQuestions.txt b/ParallelQuestions.txt index 3f953faad8f9d..e946f209bb154 100644 --- a/ParallelQuestions.txt +++ b/ParallelQuestions.txt @@ -20,11 +20,11 @@ Will religion ever die? Do we understand ourselves? What is the best way to cook eggs? If you cannot see things, on what basis do you evaluate them? -What is belief? +Explain the role of the np junction in photovoltaic cells? Is professional sport a good or bad influence on human behaviour? Is capital punishment immoral? Should we care about other people? -Who am I? +Who are you? Which sense would you surrender if you could? Was Henry Ford a hero or a villain? Do we need leaders? diff --git a/examples/parallel/parallel.cpp b/examples/parallel/parallel.cpp index 061fd3586c9cd..6d5ef76dd0337 100644 --- a/examples/parallel/parallel.cpp +++ b/examples/parallel/parallel.cpp @@ -135,7 +135,7 @@ int main(int argc, char ** argv) { k_prompts.resize(index + 1); k_prompts[index] = prompt; index++; - std::cout << std::setw(3) << std::right << index << " prompt: " << prompt << std::endl; + std::cout << std::setw(2) << std::right << index << " prompt: " << prompt << std::endl; } } @@ -395,14 +395,14 @@ int main(int argc, char ** argv) { printDateTime(); LOG_TEE("\n%s: n_parallel = %d, n_sequences = %d, cont_batching = %d, system tokens = %d\n", __func__, n_clients, n_seq, cont_batching, n_tokens_system); - LOG_TEE("\n"); + std::cout << "external prompt file (if any): " << params.prompt_file << "\n\n"; LOG_TEE("Total prompt tokens: %6d, speed: %5.2f t/s\n", n_total_prompt, (double) (n_total_prompt ) / (t_main_end - t_main_start) * 1e6); LOG_TEE("Total gen tokens: %6d, speed: %5.2f t/s\n", n_total_gen, (double) (n_total_gen ) / (t_main_end - t_main_start) * 1e6); LOG_TEE("Total speed (AVG): %6s speed: %5.2f t/s\n", "", (double) (n_total_prompt + n_total_gen) / (t_main_end - t_main_start) * 1e6); LOG_TEE("Cache misses: %6d\n", n_cache_miss); - LOG_TEE("\n\n"); + LOG_TEE("\n"); llama_print_timings(ctx); From 0dde56c15d032ede4d0defb9fee0d96f8363ab2f Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Sat, 30 Sep 2023 18:44:49 +0100 Subject: [PATCH 03/21] Upload ToK2024 --- ToK2024.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ToK2024.txt diff --git a/ToK2024.txt b/ToK2024.txt new file mode 100644 index 0000000000000..0c3a4388e9609 --- /dev/null +++ b/ToK2024.txt @@ -0,0 +1,6 @@ +Is subjectivity overly celebrated in the arts but unfairly condemned in history? Discuss with reference to the arts and history. +How can we reconcile the opposing demands for specialization and generalization in the production of knowledge? Discuss with reference to mathematics and one other area of knowledge. +Nothing is more exciting than fresh ideas, so why are areas of knowledge often so slow to adopt them? Discuss with reference to the human sciences and one other area of knowledge. +Do we underestimate the challenges of taking knowledge out of its original context and transferring it to a different context? Discuss with reference to two areas of knowledge. +Do we need custodians of knowledge? Discuss with reference to two areas of knowledge. +Are we too quick to assume that the most recent evidence is inevitably the strongest? Discuss with reference to the natural sciences and one other area of knowledge. \ No newline at end of file From 9d6533baeddcb5b51bbb96fee6c1f057103a452a Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Sat, 30 Sep 2023 22:42:02 +0100 Subject: [PATCH 04/21] Delete ToK2024.txt --- ToK2024.txt | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ToK2024.txt diff --git a/ToK2024.txt b/ToK2024.txt deleted file mode 100644 index 0c3a4388e9609..0000000000000 --- a/ToK2024.txt +++ /dev/null @@ -1,6 +0,0 @@ -Is subjectivity overly celebrated in the arts but unfairly condemned in history? Discuss with reference to the arts and history. -How can we reconcile the opposing demands for specialization and generalization in the production of knowledge? Discuss with reference to mathematics and one other area of knowledge. -Nothing is more exciting than fresh ideas, so why are areas of knowledge often so slow to adopt them? Discuss with reference to the human sciences and one other area of knowledge. -Do we underestimate the challenges of taking knowledge out of its original context and transferring it to a different context? Discuss with reference to two areas of knowledge. -Do we need custodians of knowledge? Discuss with reference to two areas of knowledge. -Are we too quick to assume that the most recent evidence is inevitably the strongest? Discuss with reference to the natural sciences and one other area of knowledge. \ No newline at end of file From 3e41cbabd1faa2c4990df0ffc32fa0f8e26d1a6e Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Mon, 2 Oct 2023 12:33:05 +0100 Subject: [PATCH 05/21] Experiments with jeopardy --- examples/jeopardy/README.md | 2 +- examples/jeopardy/jeopardy.sh | 9 +- .../jeopardy/results/Llama2-7b-ggml-q4.txt | 657 ++++++++++++++++++ 3 files changed, 663 insertions(+), 5 deletions(-) create mode 100644 examples/jeopardy/results/Llama2-7b-ggml-q4.txt diff --git a/examples/jeopardy/README.md b/examples/jeopardy/README.md index 4c42e3cdbf526..ffa13cbf349b2 100644 --- a/examples/jeopardy/README.md +++ b/examples/jeopardy/README.md @@ -2,7 +2,7 @@ This is pretty much just a straight port of aigoopy/llm-jeopardy/ with an added graph viewer. -The jeopardy test can be used to compare the fact knowledge of different models and compare them to eachother. This is in contrast to some other tests, which test logical deduction, creativity, writing skills, etc. +The jeopardy test can be used to compare the fact knowledge of different models and compare them to each other. This is in contrast to some other tests, which test logical deduction, creativity, writing skills, etc. Step 1: Open jeopardy.sh and modify the following: diff --git a/examples/jeopardy/jeopardy.sh b/examples/jeopardy/jeopardy.sh index 9bdbc755c13a7..63544f562d718 100755 --- a/examples/jeopardy/jeopardy.sh +++ b/examples/jeopardy/jeopardy.sh @@ -1,11 +1,11 @@ #!/bin/bash set -e -MODEL=./models/ggml-vicuna-13b-1.1-q4_0.bin -MODEL_NAME=Vicuna +MODEL=./models/llama-2-7b/ggml-model-q4_0.gguf +MODEL_NAME=Llama2-7b-ggml-q4 # exec options -prefix="Human: " # Ex. Vicuna uses "Human: " +prefix="Question: " # Ex. Vicuna uses "Human: " opts="--temp 0 -n 80" # additional flags nl=' ' @@ -13,6 +13,7 @@ introduction="You will be playing a game of Jeopardy. Simply answer the question # file options question_file=./examples/jeopardy/questions.txt +# if the required model file doesn't exist, create it; otherwise update it touch ./examples/jeopardy/results/$MODEL_NAME.txt output_file=./examples/jeopardy/results/$MODEL_NAME.txt @@ -21,7 +22,7 @@ counter=1 echo 'Running' while IFS= read -r question do - exe_cmd="./main -p "\"$prefix$introduction$nl$prefix$question\"" "$opts" -m ""\"$MODEL\""" >> ""\"$output_file\"" + exe_cmd="./build/bin/main -p "\"$nl$prefix$question\"" "$opts" -m ""\"$MODEL\""" >> ""\"$output_file\"" echo $counter echo "Current Question: $question" eval "$exe_cmd" diff --git a/examples/jeopardy/results/Llama2-7b-ggml-q4.txt b/examples/jeopardy/results/Llama2-7b-ggml-q4.txt new file mode 100644 index 0000000000000..b1ab6c3694194 --- /dev/null +++ b/examples/jeopardy/results/Llama2-7b-ggml-q4.txt @@ -0,0 +1,657 @@ + +Question: Which man born in 1932 was the son of a percussionist in the CBS radio orchestra has been nominated for 53 Oscars? +Answer: Alfred Hitchcock. +------ + +Question: What work in English Literature says: 'The mind is its own place, & in itself can make a heaven of hell, a hell of heaven. What matter where, if I be still the same'? + +I am looking for a quote from an English author that goes something like this: + +\begin{blockquote} + +The mind is its own place, and in itself can make a heaven of hell, a hell of heaven. +\end{blockquote} + +I have looked through the works of Shakespeare, Milton, Marlowe, Donne, Spenser, Ch +------ + +Question: Known for more philosophical works, he wrote the play 'La Mandragola', in which Florentines are rewarded for immoral actions? +Answer: Niccolò Machiavelli +------ + +Question: James Cook's account of a 1774 visit where records an object 'near 27 feet long, and upwards of 8 feet over the breast or shoulders'? + +I am trying to find out more about this object. I have found it mentioned in [this article](http://www.theguardian.com/science/2013/jun/29/giant-sea-creature-discovered-in-antarctic) and [this one](https://www.newscientist.com +------ + +Question: England's 'Bloody Assizes' & a 1685 life sentence for perjury were 2 main origins of which amendment to the U.S. Constitution? +Answer: The Fifth Amendment, which states that no person shall be "deprived of life, liberty or property without due process of law." +The Bloody Assizes was a series of trials held in 1685 by Judge Jeffreys to try those accused of involvement in the Monmouth Rebellion. The trials were conducted with little regard +------ + +Question: Which nobel peace price winners each lived at times on Vilakazi St. in Soweto , so it claims to be the world's only street home to 2 Nobel Peace Prize winners? +Answer: Nelson Mandela and Desmond Tutu +------ + +Question: In 1966, the year of who's death did he share plans for an experimental prototype community in Florida? +Answer: Robert C. Weaver (1907-1965) was a civil rights activist and politician. He served as U.S. Secretary of Housing and Urban Development from 1966 to 1968, under President Lyndon B. Johnson. +Weaver was born in Washington, D.C., the son of +------ + +Question: Of the 13 nations through which the Equator passes, what is the only one whose coastline borders the Caribbean Sea? +Answer: Ecuador. +------ + +Question: Which decorative items in fashion history get their name from their origin in the port city of Strasbourg, on the border of France & Germany? +Answer: The Strass. +The Strass is a type of beaded trimming that was popular in the late 19th century and early 20th century. It was made by sewing together small pieces of glass or metal to form a pattern. The name "Strass" comes from the French word for "street", which refers to the city of Strasbourg +------ + +Question: What 1980's movie is based on an off-Broadway play with just 3 characters and won the Best Picture Oscar & the actors in all 3 roles were nominated? +Answer: Ordinary People (1980) +The film was directed by Robert Redford, who also starred as Conrad Jarrett. The other two actors were Mary Tyrone and Donald Sutherland. +------ + +Question: A 2012 book review for which novelist noted subjects that 'sparked his ire': capital punishment, big tobacco & 'the plight of the unjustly convicted'? +I am looking for a book review from 2012 in which the author notes that he was inspired by the following subjects: +\begin{itemize} +\item Capital Punishment +\item Big Tobacco +\item The Plight of the Unjustly Convicted +\end{itemize} + +I believe this review is from a book published in +------ + +Question: A 1940 headline about what 20th Century Eponym included 'failure', 'liability when it came to offense' & 'stout hearts no match for tanks'? + +\begin{blockquote} + +A 1940 headline about what 20th Century Eponym included ‘failure’, ‘liability when it came to offense’ and ‘stout hearts no match for tanks’? +\end{blockquote} + +I'm looking for the answer to this question. I've tried searching online +------ + +Question: Over 700 years after its traditional 1252 founding date, what port city became associated with a psychological response? +Answer: The term "hubris" was coined in the 4th century BC by Athenian playwright Aeschylus. It is derived from Greek hubris (arrogance), which derives from the verb huberidzein, meaning to be proud or insolent. +The word has been used since classical times to describe a personality trait +------ + +Question: The success of what brand has its roots with a hydrotherapy pump its cofounder created for his son, who had arthritis? +The answer to the question "The success of what brand has its roots with a hydrotherapy pump its cofounder created for his son, who had arthritis?" is Show answer +tags: success brand roots hydrotherapy pump cofounder son arthritis +What is the name of the 1980s TV show that starred +------ + +Question: In a periodical in 1807, what American Author called New York City 'Gotham, Gotham! Most enlightened of cities'? +Answer: Washington Irving. +------ + +Question: What symbol is a rotated V in math and a feeling of some marginalized or underrepresented people in society? + +I'm looking for the name of this symbol. It looks like a rotated V, but I can't find it anywhere. + + + +Comment: What is the context? + +Comment: @Misha +------ + +Question: Monty Norman, the composer of what character's theme, said the staccato riff conveyed sexiness, mystery & ruthlessness? +Answer: James Bond. + +Comment: I think you mean "the composer of what character's theme" rather than "what character's theme". + +Comment: @JonathanAllan - I think it is correct as written. The question asks for the name of the composer, not the name of the character. + +Answer: \begin{blockquote} + +------ + +Question: What American Novelist served with an airman named Yohannan in World War II & despite what readers might think, he said he enjoyed his service? +Answer: John Steinbeck. He was a member of the US Navy's Pacific Theater and served as a writer for the military newspaper "The Pacific." +------ + +Question: In what Medieval place did one of the participants in an 1170 event say, 'Let us away, knights; he will rise no more'? +Answer: The Battle of Montgisard. + +Comment: I think you mean "Montgisard" and not "Montgisard". + +Comment: @JoeTaxpayer - You are correct! Thanks for the correction. +------ + +Question: At one time a province of the Roman Empire, what African country kingdom is known to Arabic scholars as Al-Maghrib Al-Aqsa, 'the far west'? +Answer: Morocco. +------ + +Question: Congress relented in 1890 after what prospective state said it would wait 100 years rather than come in without the women? + +\begin{blockquote} + +\strong{Possible Duplicate:} + + [What was the last state to be admitted into the United States?](https://history.stackexchange.com/questions/2486/what-was-the-last-state-to-be-admitted-into-the-united-states) +\end{ +------ + +Question: A writer & producer of what movie said he wanted it to be like a Western or James Bond film, 'only it takes place in the 30s'? + +A writer and producer of what movie said he wanted it to be like a Western or James Bond film, 'only it takes place in the 30s'? + +Answer: The Wachowskis' "Speed Racer" (2008) + +\begin{blockquote} + +The Wachowski brothers have said that they wanted to make +------ + +Question: In 1898 what's been called the first blockbuster art show was devoted to which artist & put on for Queen Wilhelmina's coronation? +Answer: Vincent Van Gogh. +------ + +Question: Part of the largest contiguous land empire during the 1200s & 1300s, today what is the world's second-largest landlocked country? +Answer: Kazakhstan. +------ + +Question: A 2006 book was titled 'The Poem That Changed America:' What 'Fifty Years Later'? + +A 2006 book was titled "The Poem That Changed America:" What 'Fifty Years Later'? + +I remember reading this book in high school, but I can't find it anywhere. It was a collection of poems by famous American authors, and the title poem was about how the author had been inspired to write his own poetry after reading +------ + +Question: Backed by 14,000 troops, who invaded England to restore, in his words, its 'religion, laws, and liberties'? + +Answer: Edward III of England. + +\begin{blockquote} + +In 1327, Edward III invaded France with a force of 14,000 men. He was + backed by the Pope who had excommunicated King Philip VI and declared + war on him. The invasion was unsuccessful and Edward returned to + +------ + +Question: After its completion in the late 19th c., what was landmark was called 'a truly tragic street lamp' & a 'high & skinny pyramid of iron ladders'? +Answer: The Eiffel Tower. + +Comment: I think this is a duplicate, but I can't find it. + +Comment: @Matthew Read - I don't see any other questions with the same answer. + +Comment: @MatthewRead - I don't see any other questions with the same answer. + +Answer: The E +------ + +Question: The busiest passenger port in the U.K., what shares its name with a capital of one of the original 13 states? +Answer: Southampton, England and New Hampshire, USA +------ + +Question: This man made lists, perhaps to cope with depression; a set of lists he published in 1852 made whose name synonymous with a type of book? + +\begin{blockquote} + +\strong{Possible Duplicate:} + + [What is the origin of the term “to-do list”?](https://english.stackexchange.com/questions/40691/what-is-the-origin-of-the-term-to-do-list) +\end{blockquote} + + +------ + +Question: An 1869 presidential pardon was granted to which man, due in part to a plea by the Medical Society of Harford County, Maryland? +Answer: Samuel Mudd. +Mudd was convicted for his role in the assassination of President Abraham Lincoln and sentenced to life imprisonment at hard labor. He was pardoned by President Andrew Johnson on Christmas Eve 1869. +------ + +Question: Letters, pocket knives, C rations & steel helmets are among the tangible items referred to in the title of what American literature modern war classic? +Answer: The Things They Carried by Tim O'Brien. +------ + +Question: What nonfiction book has the line, 'The discovery of America…opened up fresh ground for the rising bourgeoisie'? + +I read this in a book about the French Revolution. I think it was written by a Marxist author. The quote is from the preface to the book. + +Comment: It sounds like you are looking for a book that has a quote from the preface of another book, which is not really on topic here. + +Answer: This is a line from [The Commun +------ + +Question: A radical Republican championed what 1875 act but the Supreme Court struck it down in 1883; a new version was passed 81 years later? +A radical Republican championed what 1875 act but the Supreme Court struck it down in 1883; a new version was passed 81 years later? +Answer: The Sherman Antitrust Act. +The Sherman Antitrust Act of 1890 was an antitrust law that outlawed trusts and monopolies in +------ + +Question: Whose brothers, Castor & Pollux, saved her after Theseus stole her away as a kid; a larger force would seek her later in life? +Answer: The Dioscuri (Castor and Pollux) were the twin sons of Leda and Zeus. They were born at the same time but from different mothers. Castor was the son of Leda by her husband, Tyndareus, while Pollux was the son of Zeus. +The Dioscuri were known as the protectors of +------ + +Question: Once Africa's largest country in area, what African Country dropped to third in 2011 when a portion of it declared independence? +Answer: Sudan. The Republic of South Sudan was formed on July 9th, 2011 after the southern part of Sudan voted for secession in January 2011. +------ + +Question: The ancient writer Galen said books on ships arriving to what city's port were seized, originals kept & copies returned? +The ancient writer Galen said books on ships arriving to what city's port were seized, originals kept & copies returned? +Answer for the clue "The ancient writer Galen said books on ships arriving to what city's port were seized, originals kept & copies returned?", 4 letters: +We found one answer for the crossword clue "The ancient writer +------ + +Question: For a special 1970s cookbook, who provided one simple recipe–a can of Campbell's tomato soup & 2 cans of milk? +For a special 1970s cookbook, who provided one simple recipe–a can of Campbell's tomato soup & 2 cans of milk? +Answer: The book was called "The Joy of Cooking" by Irma S. Rombauer and Marion Rombauer Becker. It was first published in 1931, and +------ + +Question: Thought to descend from people of Southeast Asia, the Chamorro make up what U.S. territory’s largest ethnic group? +Answer: Guam +------ + +Question: In office from 2022, the president of what country has taken so many foreign trips a play on his name is 'Ferdinand Magellan Jr.'? +Answer: Ferdinand Marcos Jr. +------ + +Question: In 1939 which writer lived on Toulouse Street in the French Quarter & chose the professional name that bonded him to the South? +Answer: Tennessee Williams. +------ + +Question: What National Park is named for a river indigenous people called Mi tse a-da-zi, translated by French-speaking trappers as 'Pierre Jaune'? +Answer: Yellowstone National Park. +------ + +Question: In 2010 who introduced the 4-point shot, 35 feet from the basket? +Question: In 2010 who introduced the 4-point shot, 35 feet from the basket? +Answer: The NBA. +The NBA introduced a new rule in 2010 that allowed players to shoot a four point shot if they were behind the three point line and closer than 35 feet away from the basket. This was done to increase scoring +------ + +Question: Losses over Asia in the 1960s led to the establishment of the program known as what at a San Diego naval base in 1969? +Answer: The Pacific Missile Range Facility (PMRF) was established on the island of Kauai, Hawaii. It is used for testing and evaluating missiles and other weapons systems. +------ + +Question: A craft that visited what was named for Giotto, based on the story that 680 years earlier, the painter depicted it as the Star of Bethlehem? + +A craft that visited what was named for Giotto, based on the story that 680 years earlier, the painter depicted it as the Star of Bethlehem? + +The answer is the [Giotto's Bell Tower](https://en.wikipedia.org/wiki/Giotto%27s_Bell_Tower), but I can't +------ + +Question: In World War I, 'Cistern' & 'reservoir' were suggested names for what secret invention, but the British preferred this less clumsy monosyllable? +Answer: Submarine. +------ + +Question: Until 1806, some German nobles included among their honors the title of 'Elector' for their role in selecting this personage? +Answer: The Holy Roman Emperor. + +### Dummy answer +_No, that is not correct._ + +### Real answer +_The Holy Roman Emperor was elected by the Electors of the Holy Roman Empire._ + +------ + +Question: In 1904, wearing a harness, actress Nina Boucicault became the first to play what character onstage? +Answer: A horse. +------ + +Question: Alphabetically the first German city in encyclopedias, what was also the first one taken by the Allies in World War II? +Answer: Aachen. +------ + +Question: This Sanskrit word referring to a spoken word or phrase comes from a word for 'to think'? + +I am looking for the name of this Sanskrit word. It refers to a spoken word or phrase, and it is derived from a word meaning 'to think'. + +Comment: I don't know if you are aware that there are many words in English which have been borrowed from other languages. For example, "coup d'etat" comes from French +------ + +Question: 1917's 'Elements of Trench Warfare' said what Old West invention was 'difficult to destroy' & 'difficult to get through'? +Answer: The barbed wire fence. + +Comment: I think this is a duplicate, but I can't find it. + +Comment: @MikeEarnest - I don't see any other questions that are close matches for this one. If you do, please post the link here so we can vote to close as a duplicate. +------ + +Question: Mimi Reinhard, who never learned to type using more than 2 fingers, produced what in World War II with 1,100 names, including hers? +Answer: A book of poetry. +------ + +Question: Poseidon carried off the maiden Theophane & turned her into a ewe; their offspring was the source of what mythical object? +Answer: Aphrodite's girdle. +------ + +Question: Published in 2011, P.D. James' final novel, 'Death Comes to Pemberley', was a sequel to what novel from 200 years earlier? +Answer: "Pride and Prejudice" by Jane Austen +------ + +Question: 5 U.S. states have 6-letter names; only which 2 west of the Mississippi River border each other? + +\begin{blockquote} + + 5 U.S. states have 6-letter names; only which 2 west of the Mississippi River border each other? +\end{blockquote} + +Answer: The two states are + +\begin{blockquote} + + Arizona and New Mexico +\end{blockquote} + +Because they share a border, and both +------ + +Question: Originally relating to a story of suffering, what word now more commonly refers to strong emotion of any kind? + +I'm looking for the word that originally referred to a story of suffering but is now used to refer to any strong emotion. + +The original meaning was "a narrative of some great misfortune or calamity" (OED). + +Comment: I think you mean *emotional* rather than *emotive*. + +Answer: \strong +------ + +Question: The 2007 biopic called 'La Môme' in France, meaning 'The Kid', was released in the U.S. under what other French title? +Answer: La Vie en Rose +------ + +Question: Returning home in 1493, Columbus stopped in the Azores at an island with what name, also something he'd lost off the Haiti coast? +Answer: Santa Maria de la Palma (Santa Maria of the Peak) +Question: What is the only country to have been ruled by a woman and her daughter? +Answer: The Netherlands. Wilhelmina was Queen from 1890-1948, and Juliana from 1948-1980. +Question: In 1 +------ + +Question: Pskov & Nizhny Novgorod are 2 of the cities that have a fortress called what? + +Pskov & Nizhny Novgorod are 2 of the cities that have a fortress called what? + +Answer: Kremlin +------ + +Question: In the 1950s the New York Times said what author 'is writing about all lust' & his lecherous narrator 'is all of us'? + +In the 1950s, the New York Times said that a certain author was writing about "all lust" and his lecherous narrator "is all of us." + +The author is not Philip Roth. + +The author is not John Updike. + +The author is not Vladimir Nabokov. + +The author is not Norman +------ + +Question: At the winter solstice, the sun is in Sagittarius; it once appeared in what constellation, giving a geographic feature its name? +Answer: Capricornus. +------ + +Question: Mike Post combined the sound of a slamming jail door, an anvil & 100 men stomping on a floor for what television series that debuted in 1990? +Mike Post combined the sound of a slamming jail door, an anvil & 100 men stomping on a floor for what television series that debuted in 1990? +Answer: NYPD Blue +------ + +Question: Like Sir Thomas More, 3 16th century English queens are buried at what British location? +Answer: Westminster Abbey. + +### Hint + +The first queen was the wife of Henry VIII and the second was his daughter. The third was a granddaughter of Henry VII. +------ + +Question: In 1692 Increase Mather wrote, 'It were better that ten suspected' of these who 'escape, than that one innocent person be condemned'? + +_Increase Mather_, _A Seasonable Argument Against Pretended Witchcraft_ (1692): + +\begin{blockquote} + +It is a maxim in law, That it were better ten guilty persons should escape than that one innocent person should suffer. Such a principle would surely have been here highly acceptable. For if we suppose, that +------ + +Question: The Geography Mnemonic Mimal, sometimes said to be the silhouette of a chef or elf, stands for Minnesota, Iowa, Missouri, and what other 2 states? +Answer: Arkansas and Louisiana. +------ + +Question: What was first sold in 1908, at a price equivalent to about 7,000 today? + +What was first sold in 1908, at a price equivalent to about 7,000 today? + +Answer: The first car. + +The Ford Model T was introduced on October 1st, 1908 and cost $850 (about $23,000 in 2016 dollars). + +Comment +------ + +Question: The name of what author dead since 2013 now appears on books written by a former U.S. marshal & a former Apache helicopter pilot? +Answer: J. D. Salinger, who died in 2010. +------ + +Question: The artwork once known in France as 'la tapisserie de la Reine Mathilde' is better known as what? + +The artwork once known in France as 'la tapisserie de la Reine Mathilde' is better known as what? + +Answer: The Bayeux Tapestry +------ + +Question: In 2022 which pop star became the first woman to have a Billboard Top 10 album in 5 decades starting with the 1980s? +Answer: Madonna. +------ + +Question: In one 19th century translation, what female classic tale character 'perceived the dawn of day and ceased' speaking nearly 1,000 times? +Answer: The Wife of Bath. +------ + +Question: Ironically, though what company founded in the 1860s is Moore County, Tennessee's largest employer, Moore is a dry county? +Answer: The Jack Daniel Distillery. +------ + +Question: After a 1789 event, who wrote, 'My first determination was to seek a supply of…water at Tofoa, & afterwards to sail for Tongataboo'? + +After a 1789 event, who wrote, 'My first determination was to seek a supply of water at Tofoa, & afterwards to sail for Tongataboo'? + +Answer: James Cook + +\begin{blockquote} + + On 20 April 1769, the Endeavour ran aground on the Great Bar +------ + +Question: Laurence Olivier & Ernest Borgnine were considered for the lead role & Sergio Leone to direct for what film that turned 50 in 2022? +Answer: The Wild Bunch (1969) +------ + +Question: Until a 1903 secession, what country's contiguous territory spanned 2 continents? +Answer: The Russian Empire. + +Comment: I think you mean "contiguous" rather than "congruent". + +Comment: @JonathanAllan: I don't know if that's the right word, but it is a correct answer to the question as asked. + +Comment: @JonathanAllan: I'm not sure what +------ + +Question: Early in her career which foreign-born author translated romance novels into Spanish, often changing the dialogue to make the heroines smarter? +Answer: Isabel Allende. +------ + +Question: Saying it was stolen by Napoleon, self-styled Italian patriot Vincenzo Peruggia took what in 1911? +Answer: The Mona Lisa. + +### Hint + +The painting was recovered in 1913. +------ + +Question: Continuing a downward trend, in July 2022 what US body of water was at 27% capacity, its lowest level since 1937 when it was first being filled? +Answer: Lake Mead +------ + +Question: Each morning which goddess began her ride in her chariot across the sky ahead of her brother Sol, or Helios? +Answer: The answer is Eos. + +Comment: I'm not sure if this is a duplicate question, but it seems to be related to [this one](https://puzzling.stackexchange.com/questions/102895/each-morning-which-goddess-began-her-ride-in-her-chariot- +------ + +Question: Until the Civil War, the Jan. 8 date of what American battle of dubious military importance but big morale value was a national holiday? +Answer: The Battle of New Orleans (1815) +------ + +Question: Which children's book title character is told 'By the time you are real, most of your hair has been loved off your eyes drop out & you get shabby'? + +Which children's book title character is told 'By the time you are real, most of your hair has been loved off your eyes drop out & you get shabby'? + +Answer: The Cat in the Hat. + +\begin{blockquote} + +"You're a mess," said the Cat. "By the time you are real, most of +------ + +Question: In a TV reunion over 40 years in the making, Dolly Parton appeared as an angel named Agnes in the final episode of what comedy in 2022? +Answer: The Last O.G. +------ + +Question: In an 1847 American poem what character sees her town of Grand-Pré burned, but finally reunites with her beau for a kiss before his death? + +In an 1847 American poem what character sees her town of Grand-Pré burned, but finally reunites with her beau for a kiss before his death? + +Answer: + +\begin{blockquote} + + \em{Anne of Green Gables} by L. M. Montgomery +\end{blockquote} +------ + +Question: In 2001 who published a book called 'Banging Your Head Against a Brick Wall'; in 2002, 'Existencilism'? + +In 2001 who published a book called 'Banging Your Head Against a Brick Wall'; in 2002, 'Existencilism'? + +Comment: I think this is a duplicate of [this question](https://puzzling.stackexchange.com/questions/68945/who-published-a- +------ + +Question: The title object of what childrens book 'never looked more beautiful each strand held dozens of bright drops of early morning dew'? + +The title object of what children's book 'never looked more beautiful each strand held dozens of bright drops of early morning dew'? + +Answer: The answer is "The Wind in the Willows" by Kenneth Grahame. + +\begin{blockquote} + +"The Mole had long been proud of his tail, which was really +------ + +Question: The shouts of excited children at a 1946 holiday parade are said to have inspired what perennial classic song favorite? +Answer: Jingle Bells. +------ + +Question: Unable to make what candies perfectly round, the confectioner embraced this flawed name for the product? +Answer: Jelly Beans. + +Comment: I'm not sure if it is a joke or not but I think that jelly beans are perfectly round. + +Comment: @MatthewWoodland - They're not, they're oblong. + +Comment: @MatthewWoodland - The question says "perfectly round +------ + +Question: What country is home to 58 UNESCO World Heritage Sites, more than any other country; the sites include a volcano & a lagoon? +Answer: Italy. +------ + +Question: What action movie's last line is 'If this is their idea of Christmas, I gotta be here for New Years'? + +I remember watching a movie where the main character was in a bar and he said that line. It was an action movie with a lot of explosions and gunfights. The main character was a man who had been wronged by someone and was seeking revenge. I think it might have been a western, but I'm not sure. + +Comment: This is a very +------ + +Question: Only 3 presidents have married while in office— John Tyler was the first & which one was the last? +Answer: Ronald Reagan. + +Comment: I'm not sure if this is a duplicate, but it seems to be related to [this question](https://puzzling.stackexchange.com/questions/102895/how-many-us-presidents-have-been-married). + +Answer: \section{John Tyler +------ + +Question: Demonstrating the dignity & humanity of Black Americans, who sat for 160 known photographs, the most of any American in the 19th century? + +I'm looking for a good book or article that demonstrates the dignity and humanity of Black Americans during the 1840-1870 period. + +The best I can find is this: +\begin{itemize} +\item [African American Photographs from the 19th Century](http://www.loc.gov +------ + +Question: Originally, which Latin 3-word phrase referred to when a doctor or apothecary substituted one medicine for another? +Answer: ______ _______ ________ + +Comment: I'm not sure if this is the right place to ask this question. If it isn't, please let me know where I should post it. + +Comment: @JoeBlow - It's fine here. + +Answer: \strong{Substitutum} + +From [ +------ + +Question: The 1975 premiere of what movie comedy advertised free coconuts for the first thousand in the audience? +Answer: "The Groove Tube" was a 1974 American television special that premiered on NBC. It was written and directed by Ken Shapiro, who also starred in it with Chevy Chase, Richard Belzer, Laraine Newman, Patricia Charbonneau, John Candy, and others. The show was a par +------ + +Question: A cocktail, an island & a WWII venture originally called 'Development of Substitute Materials' all bear what name? +Answer: Daiquiri +The Daiquiri is a cocktail made with rum, lime juice and sugar. It was invented by Jennings Cox in the 19th century at the mining town of Daiquiri in Cuba. The drink became popular during Prohibition in the United States when it was served at the famous New York City +------ + +Question: Which US President was sworn in twice as President within 2 years, first by his father & then later by a former U.S. President? +Answer: John Tyler (1790-1862) +John Tyler was the tenth president of the United States and the first vice president to become president after the death of the incumbent president. He was born in 1790, the son of a Virginia governor. His father died when he was ten years old, and his mother remar +------ + +Question: A 1609 story in which an exiled king of Bulgaria creates a sea palace with his magic may have inspired the plot of what play? +Answer: The Tempest. +------ + +Question: In 2009, during a 20th anniversary celebration, what landmark was called 'an edifice of fear. On Nov. 9, it became a place of joy'? +Answer: The Berlin Wall +------ + +Question: Among what world capital's nicknames are the 'City of Classical Music' &, possibly in honor of a famous resident from 1860 to 1938, the 'City of Dreams'? +Answer: Vienna (Austria) +------ + +Question: Now meaning someone with nocturnal habits, what catches a sleeping dove in Shakespeare's 'Lucrece'? + +In Shakespeare's \em{The Rape of Lucrece}, the character Tarquin is described as having "nocturnal habits" (line 102). Later, he says: + +\begin{blockquote} + +I am a man that, by my will, + + Can do a great deal. + + I have noct +------ + +Question: The stars on what country's flag represent states, 26 of them; unlike the USA's, its 'federal district' gets its own 27th star? +I saw a flag with 26 stars in a row and then one more at the top. I think it was a US state flag but I can't remember which one. +The stars on what country's flag represent states, 26 of them; unlike the USA's, its 'federal district' gets its own 27th star? +I +------ + +Question: What father was the only man among the 13 plaintiffs in a US class-action case filed in 1951? +Answer: The father of the 13 plaintiffs was the only man. +The case was Brown v Board of Education, and it was the first time that the Supreme Court ruled that segregation of schools on the basis of race was unconstitutional. +------ + +Question: Reversing the story of what heroine she created, childrens author Patricia Maclachlan was born on the prairie but spent much of her life in New England? +Answer: She was born in North Dakota and moved to Massachusetts when she was a teenager. +------ From d673691619818d4a668ec89384109d2743184fad Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Mon, 2 Oct 2023 13:15:15 +0100 Subject: [PATCH 06/21] Move ParallelQuestions to /proimpts and rename --- prompts/parallel_questions.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 prompts/parallel_questions.txt diff --git a/prompts/parallel_questions.txt b/prompts/parallel_questions.txt new file mode 100644 index 0000000000000..e946f209bb154 --- /dev/null +++ b/prompts/parallel_questions.txt @@ -0,0 +1,32 @@ +What do you know about Hobbits? +What is quantum field theory? +Why did the chicken cross the road? +Who is the president of the United States? +How do I run CMake on MacOS? +Do you agree that C++ is a really finicky language compared with Python3? +Is it a good idea to invest in technology? +Do you like Wagner's Ring? +Do you think this file input option is really neat? +What should we all do about climate change? +Is time-travel possible within the laws of current physics? +Is it like anything to be a bat? +Once the chicken has crossed the road, does it try to go back? +Who is the greatest of all musical composers? +What is art? +Is there life elsewhere in the universe? +What is intelligence? +What is the difference between knowledge and intelligence? +Will religion ever die? +Do we understand ourselves? +What is the best way to cook eggs? +If you cannot see things, on what basis do you evaluate them? +Explain the role of the np junction in photovoltaic cells? +Is professional sport a good or bad influence on human behaviour? +Is capital punishment immoral? +Should we care about other people? +Who are you? +Which sense would you surrender if you could? +Was Henry Ford a hero or a villain? +Do we need leaders? +What is nucleosynthesis? +Who is the greatest scientist of all time so far? \ No newline at end of file From 51196a44dc7901440a7aef2cf12a7fd7a61f1848 Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Tue, 3 Oct 2023 09:46:53 +0100 Subject: [PATCH 07/21] Interim commit --- common/common.h | 2 +- examples/parallel/parallel.cpp | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/common/common.h b/common/common.h index 63fa0e8e52739..c802152791797 100644 --- a/common/common.h +++ b/common/common.h @@ -79,7 +79,7 @@ struct gpt_params { std::string model_draft = ""; // draft model for speculative decoding std::string model_alias = "unknown"; // model alias std::string prompt = ""; - std::string prompt_file = ""; // store for external prompt file name + std::string prompt_file = ""; // store the external prompt file name std::string path_prompt_cache = ""; // path to file for saving/loading prompt eval state std::string input_prefix = ""; // string to prefix user inputs with std::string input_suffix = ""; // string to suffix user inputs with diff --git a/examples/parallel/parallel.cpp b/examples/parallel/parallel.cpp index 6d5ef76dd0337..a08847224349d 100644 --- a/examples/parallel/parallel.cpp +++ b/examples/parallel/parallel.cpp @@ -72,13 +72,17 @@ struct client { std::vector tokens_prev; }; -static void printDateTime() { - std::time_t currentTime = std::time(nullptr); - std::cout << "\n\033[35mRUN PARAMETERS as at \033[0m" << std::ctime(¤tTime); +static void print_date_time() { + std::time_t current_time = std::time(nullptr); + std::tm* local_time = std::localtime(¤t_time); + char buffer[80]; + strftime(buffer, sizeof(buffer), "%Y-%m-%d %H:%M:%S", local_time); + + printf("\n\033[35mrun parameters as at %s\033[0m\n", buffer); } // Define a split string function to ... -static std::vector splitString(const std::string& input, char delimiter) { +static std::vector split_string(const std::string& input, char delimiter) { std::vector tokens; std::istringstream stream(input); std::string token; @@ -124,18 +128,18 @@ int main(int argc, char ** argv) { // load the prompts from an external file if there are any if (params.prompt.empty()) { - std::cout << "\n\033[32mNo new questions so proceed with build-in defaults.\033[0m"; + printf("\n\033[32mNo new questions so proceed with build-in defaults.\033[0m"); } else { // Output each line of the input params.prompts vector and copy to k_prompts int index = 0; - std::cout << "\n\033[32mNow printing the external prompt file " << params.prompt_file << "\033[0m\n\n"; + printf("\n\033[32mNow printing the external prompt file %s\033[0m\n\n", params.prompt_file); - std::vector prompts = splitString(params.prompt, '\n'); + std::vector prompts = split_string(params.prompt, '\n'); for (const auto& prompt : prompts) { k_prompts.resize(index + 1); k_prompts[index] = prompt; index++; - std::cout << std::setw(2) << std::right << index << " prompt: " << prompt << std::endl; + printf("%3d prompt: %s\n", index, prompt); } } @@ -392,10 +396,10 @@ int main(int argc, char ** argv) { const auto t_main_end = ggml_time_us(); - printDateTime(); + print_date_time(); LOG_TEE("\n%s: n_parallel = %d, n_sequences = %d, cont_batching = %d, system tokens = %d\n", __func__, n_clients, n_seq, cont_batching, n_tokens_system); - std::cout << "external prompt file (if any): " << params.prompt_file << "\n\n"; + printf("external prompt file (if any): %s \n\n", params.prompt_file); LOG_TEE("Total prompt tokens: %6d, speed: %5.2f t/s\n", n_total_prompt, (double) (n_total_prompt ) / (t_main_end - t_main_start) * 1e6); LOG_TEE("Total gen tokens: %6d, speed: %5.2f t/s\n", n_total_gen, (double) (n_total_gen ) / (t_main_end - t_main_start) * 1e6); From 2e3dad3a9c7a8f2ddfad0eeb094fe8d554878212 Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Tue, 3 Oct 2023 10:10:00 +0100 Subject: [PATCH 08/21] Interim commit --- .gitignore | 2 ++ ParallelQuestions.txt | 32 -------------------------------- examples/parallel/parallel.cpp | 9 ++++----- llama.cpp | 10 +++++----- 4 files changed, 11 insertions(+), 42 deletions(-) delete mode 100644 ParallelQuestions.txt diff --git a/.gitignore b/.gitignore index a552139f10dac..c63e01fb35604 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,8 @@ build*/ out/ tmp/ +cmake-all.sh + models/* models-mnt diff --git a/ParallelQuestions.txt b/ParallelQuestions.txt deleted file mode 100644 index e946f209bb154..0000000000000 --- a/ParallelQuestions.txt +++ /dev/null @@ -1,32 +0,0 @@ -What do you know about Hobbits? -What is quantum field theory? -Why did the chicken cross the road? -Who is the president of the United States? -How do I run CMake on MacOS? -Do you agree that C++ is a really finicky language compared with Python3? -Is it a good idea to invest in technology? -Do you like Wagner's Ring? -Do you think this file input option is really neat? -What should we all do about climate change? -Is time-travel possible within the laws of current physics? -Is it like anything to be a bat? -Once the chicken has crossed the road, does it try to go back? -Who is the greatest of all musical composers? -What is art? -Is there life elsewhere in the universe? -What is intelligence? -What is the difference between knowledge and intelligence? -Will religion ever die? -Do we understand ourselves? -What is the best way to cook eggs? -If you cannot see things, on what basis do you evaluate them? -Explain the role of the np junction in photovoltaic cells? -Is professional sport a good or bad influence on human behaviour? -Is capital punishment immoral? -Should we care about other people? -Who are you? -Which sense would you surrender if you could? -Was Henry Ford a hero or a villain? -Do we need leaders? -What is nucleosynthesis? -Who is the greatest scientist of all time so far? \ No newline at end of file diff --git a/examples/parallel/parallel.cpp b/examples/parallel/parallel.cpp index a08847224349d..e891be7dabbf1 100644 --- a/examples/parallel/parallel.cpp +++ b/examples/parallel/parallel.cpp @@ -11,7 +11,6 @@ #include #include #include -#include // trim whitespace from the beginning and end of a string static std::string trim(const std::string & str) { @@ -132,14 +131,14 @@ int main(int argc, char ** argv) { } else { // Output each line of the input params.prompts vector and copy to k_prompts int index = 0; - printf("\n\033[32mNow printing the external prompt file %s\033[0m\n\n", params.prompt_file); + printf("\n\033[32mNow printing the external prompt file %s\033[0m\n\n", params.prompt_file.c_str()); std::vector prompts = split_string(params.prompt, '\n'); for (const auto& prompt : prompts) { k_prompts.resize(index + 1); k_prompts[index] = prompt; index++; - printf("%3d prompt: %s\n", index, prompt); + printf("%3d prompt: %s\n", index, prompt.c_str()); } } @@ -272,7 +271,7 @@ int main(int argc, char ** argv) { client.n_decoded = 0; client.i_batch = batch.n_tokens - 1; - LOG_TEE("\033[1mClient %3d, seq %4d, started decoding ...\033[0m\n", client.id, client.seq_id); + LOG_TEE("\033[31mClient %3d, seq %4d, started decoding ...\033[0m\n", client.id, client.seq_id); g_seq_id += 1; @@ -399,7 +398,7 @@ int main(int argc, char ** argv) { print_date_time(); LOG_TEE("\n%s: n_parallel = %d, n_sequences = %d, cont_batching = %d, system tokens = %d\n", __func__, n_clients, n_seq, cont_batching, n_tokens_system); - printf("external prompt file (if any): %s \n\n", params.prompt_file); + printf("external prompt file (if any): %s \n\n", params.prompt_file.c_str()); LOG_TEE("Total prompt tokens: %6d, speed: %5.2f t/s\n", n_total_prompt, (double) (n_total_prompt ) / (t_main_end - t_main_start) * 1e6); LOG_TEE("Total gen tokens: %6d, speed: %5.2f t/s\n", n_total_gen, (double) (n_total_gen ) / (t_main_end - t_main_start) * 1e6); diff --git a/llama.cpp b/llama.cpp index 05b570bd12ee2..1eb2be40f4dbb 100644 --- a/llama.cpp +++ b/llama.cpp @@ -7587,14 +7587,14 @@ void llama_print_timings(struct llama_context * ctx) { const llama_timings timings = llama_get_timings(ctx); LLAMA_LOG_INFO("\n"); - LLAMA_LOG_INFO("%s: load time = %8.2f ms\n", __func__, timings.t_load_ms); - LLAMA_LOG_INFO("%s: sample time = %8.2f ms / %5d runs (%8.2f ms per token, %8.2f tokens per second)\n", + LLAMA_LOG_INFO("%s: load time = %10.2f ms\n", __func__, timings.t_load_ms); + LLAMA_LOG_INFO("%s: sample time = %10.2f ms / %5d runs (%8.2f ms per token, %8.2f tokens per second)\n", __func__, timings.t_sample_ms, timings.n_sample, timings.t_sample_ms / timings.n_sample, 1e3 / timings.t_sample_ms * timings.n_sample); - LLAMA_LOG_INFO("%s: prompt eval time = %8.2f ms / %5d tokens (%8.2f ms per token, %8.2f tokens per second)\n", + LLAMA_LOG_INFO("%s: prompt eval time = %10.2f ms / %5d tokens (%8.2f ms per token, %8.2f tokens per second)\n", __func__, timings.t_p_eval_ms, timings.n_p_eval, timings.t_p_eval_ms / timings.n_p_eval, 1e3 / timings.t_p_eval_ms * timings.n_p_eval); - LLAMA_LOG_INFO("%s: eval time = %8.2f ms / %5d runs (%8.2f ms per token, %8.2f tokens per second)\n", + LLAMA_LOG_INFO("%s: eval time = %10.2f ms / %5d runs (%8.2f ms per token, %8.2f tokens per second)\n", __func__, timings.t_eval_ms, timings.n_eval, timings.t_eval_ms / timings.n_eval, 1e3 / timings.t_eval_ms * timings.n_eval); - LLAMA_LOG_INFO("%s: total time = %8.2f ms\n", __func__, (timings.t_end_ms - timings.t_start_ms)); + LLAMA_LOG_INFO("%s: total time = %10.2f ms\n", __func__, (timings.t_end_ms - timings.t_start_ms)); } void llama_reset_timings(struct llama_context * ctx) { From b343833720f5c5faa8b064d323fe7920c84610ac Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Tue, 3 Oct 2023 14:45:31 +0100 Subject: [PATCH 09/21] Final revision --- examples/parallel/parallel.cpp | 2 +- prompts/{parallel_questions.txt => parallel-questions.txt} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename prompts/{parallel_questions.txt => parallel-questions.txt} (100%) diff --git a/examples/parallel/parallel.cpp b/examples/parallel/parallel.cpp index e891be7dabbf1..107a26ff647a3 100644 --- a/examples/parallel/parallel.cpp +++ b/examples/parallel/parallel.cpp @@ -127,7 +127,7 @@ int main(int argc, char ** argv) { // load the prompts from an external file if there are any if (params.prompt.empty()) { - printf("\n\033[32mNo new questions so proceed with build-in defaults.\033[0m"); + printf("\n\033[32mNo new questions so proceed with build-in defaults.\033[0m\n"); } else { // Output each line of the input params.prompts vector and copy to k_prompts int index = 0; diff --git a/prompts/parallel_questions.txt b/prompts/parallel-questions.txt similarity index 100% rename from prompts/parallel_questions.txt rename to prompts/parallel-questions.txt From 028681835b791f2815e2398feae309039e4958e9 Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Tue, 3 Oct 2023 20:40:30 +0100 Subject: [PATCH 10/21] Remove trailing whitespace --- examples/parallel/parallel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/parallel/parallel.cpp b/examples/parallel/parallel.cpp index 107a26ff647a3..fa5c3b7384c81 100644 --- a/examples/parallel/parallel.cpp +++ b/examples/parallel/parallel.cpp @@ -398,7 +398,7 @@ int main(int argc, char ** argv) { print_date_time(); LOG_TEE("\n%s: n_parallel = %d, n_sequences = %d, cont_batching = %d, system tokens = %d\n", __func__, n_clients, n_seq, cont_batching, n_tokens_system); - printf("external prompt file (if any): %s \n\n", params.prompt_file.c_str()); + printf("external prompt file (if any): %s\n\n", params.prompt_file.c_str()); LOG_TEE("Total prompt tokens: %6d, speed: %5.2f t/s\n", n_total_prompt, (double) (n_total_prompt ) / (t_main_end - t_main_start) * 1e6); LOG_TEE("Total gen tokens: %6d, speed: %5.2f t/s\n", n_total_gen, (double) (n_total_gen ) / (t_main_end - t_main_start) * 1e6); From 18b342dbbb309a04f5d850735ba36ff99078126e Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Tue, 3 Oct 2023 20:50:02 +0100 Subject: [PATCH 11/21] remove cmake_all.sh --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index df73ca9bfd69e..45dc44e7f5420 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ out/ tmp/ cmake-all.sh +cmake_all.sh models/* models-mnt From 53663759b1dd12ec0b1631b4604929b380c94392 Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Wed, 4 Oct 2023 08:27:10 +0100 Subject: [PATCH 12/21] Remove cmake_all.sh --- cmake_all.sh | 6 ------ 1 file changed, 6 deletions(-) delete mode 100755 cmake_all.sh diff --git a/cmake_all.sh b/cmake_all.sh deleted file mode 100755 index 4b94a4eec513e..0000000000000 --- a/cmake_all.sh +++ /dev/null @@ -1,6 +0,0 @@ -cd llama.cpp -rm -r build -cmake -B build -cd build -cmake --build . --config Release -cd .. \ No newline at end of file From 2f0181bd29858334230adb27b0504b9699dc4970 Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Wed, 4 Oct 2023 08:32:54 +0100 Subject: [PATCH 13/21] Changed .gitignore --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 45dc44e7f5420..4d5767d228b86 100644 --- a/.gitignore +++ b/.gitignore @@ -28,9 +28,6 @@ build*/ out/ tmp/ -cmake-all.sh -cmake_all.sh - models/* models-mnt From f75fe3877010ced8fd04419a95664fef61ef2ecd Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Wed, 4 Oct 2023 10:56:30 +0100 Subject: [PATCH 14/21] Improved reporting and new question files. --- examples/parallel/parallel.cpp | 6 +++++- prompts/LLM-questions.txt | 39 ++++++++++++++++++++++++++++++++++ prompts/parallel-questions.txt | 12 ++++++++++- 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 prompts/LLM-questions.txt diff --git a/examples/parallel/parallel.cpp b/examples/parallel/parallel.cpp index 886de08f894e3..f0e49249bc35c 100644 --- a/examples/parallel/parallel.cpp +++ b/examples/parallel/parallel.cpp @@ -398,7 +398,11 @@ int main(int argc, char ** argv) { print_date_time(); LOG_TEE("\n%s: n_parallel = %d, n_sequences = %d, cont_batching = %d, system tokens = %d\n", __func__, n_clients, n_seq, cont_batching, n_tokens_system); - printf("external prompt file (if any): %s\n\n", params.prompt_file.c_str()); + if (params.prompt_file.empty()) { + params.prompt_file = "used build-in defaults"; + } + printf("External prompt file: \033[32m%s\033[0m\n", params.prompt_file.c_str()); + printf("Model and path used: \033[32m%s\033[0m\n\n", params.model.c_str()); LOG_TEE("Total prompt tokens: %6d, speed: %5.2f t/s\n", n_total_prompt, (double) (n_total_prompt ) / (t_main_end - t_main_start) * 1e6); LOG_TEE("Total gen tokens: %6d, speed: %5.2f t/s\n", n_total_gen, (double) (n_total_gen ) / (t_main_end - t_main_start) * 1e6); diff --git a/prompts/LLM-questions.txt b/prompts/LLM-questions.txt new file mode 100644 index 0000000000000..79fa9885541a7 --- /dev/null +++ b/prompts/LLM-questions.txt @@ -0,0 +1,39 @@ +In the context of LLMs, what is "Attention"? +In the context of LLMs, what is a completion? +In the context of LLMs, what is a prompt? +In the context of LLMs, what is GELU? +In the context of LLMs, what is RELU? +In the context of LLMs, what is softmax? +In the context of LLMs, what is decoding? +In the context of LLMs, what is encoding? +In the context of LLMs, what is tokenizing? +In the context of LLMs, what is an embedding? +In the context of LLMs, what is an quantization? +In the context of LLMs, what is a tensor? +In the context of LLMs, what is a sparse tensor? +In the context of LLMs, what is a vector? +In the context of LLMs, how is attention implemented? +In the context of LLMs, why is attention all you need? +In the context of LLMs, what is "RoPe" and what is it used for? +In the context of LLMs, what is "LoRA" and what is it used for? +In the context of LLMs, what are weights? +In the context of LLMs, what are biases? +In the context of neural nets, what is a hidden layer? +In the context of neural nets, what is a convolution? +In the context of neural nets, what is dropout? +In the context of neural nets, what is cross-entropy? +In the context of neural nets, what is over-fitting? +In the context of neural nets, what is under-fitting? +What is the difference between an interpreted computer language and a compiled computer language? +What is a debugger? +When processing using a GPU, what is off-loading? +When processing using a GPU, what is a batch? +When processing using a GPU, what is a block? +When processing using a GPU, what is the difference between a batch and a block? +When processing using a GPU, what is a scratch tensor? +When processing using a GPU, what is a layer? +When processing using a GPU, what is a cache? +When processing using a GPU, what is unified memory? +When processing using a GPU, what is VRAM? +When processing using a GPU, what is a kernel? +When processing using a GPU, what is "metal"? \ No newline at end of file diff --git a/prompts/parallel-questions.txt b/prompts/parallel-questions.txt index e946f209bb154..0ef9d889330fd 100644 --- a/prompts/parallel-questions.txt +++ b/prompts/parallel-questions.txt @@ -29,4 +29,14 @@ Which sense would you surrender if you could? Was Henry Ford a hero or a villain? Do we need leaders? What is nucleosynthesis? -Who is the greatest scientist of all time so far? \ No newline at end of file +Who is the greatest scientist of all time? +Who first observed what came to be known as the photovoltaic effect? +What is nuclear fusion and why does it release energy? +Can you know that you exist? +What is an exoplanet? +Do you like cream? +What is the difference? +Can I know that I exist while I'm dreaming that I'm Descartes? +Who said "I didn't know I thought that until I heard myself saying it"? +Does anything really matter? +Can you explain the unreasonable effectiveness of mathematics? \ No newline at end of file From a02e042eb9f105e83bb9eed0e9db123d562c3891 Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Wed, 4 Oct 2023 11:01:57 +0100 Subject: [PATCH 15/21] Corrected typo --- examples/parallel/parallel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/parallel/parallel.cpp b/examples/parallel/parallel.cpp index f0e49249bc35c..25ca2d06342d6 100644 --- a/examples/parallel/parallel.cpp +++ b/examples/parallel/parallel.cpp @@ -399,7 +399,7 @@ int main(int argc, char ** argv) { LOG_TEE("\n%s: n_parallel = %d, n_sequences = %d, cont_batching = %d, system tokens = %d\n", __func__, n_clients, n_seq, cont_batching, n_tokens_system); if (params.prompt_file.empty()) { - params.prompt_file = "used build-in defaults"; + params.prompt_file = "used built-in defaults"; } printf("External prompt file: \033[32m%s\033[0m\n", params.prompt_file.c_str()); printf("Model and path used: \033[32m%s\033[0m\n\n", params.model.c_str()); From 000c4681e4b32a8662c4b333912e14541d59a97d Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Wed, 4 Oct 2023 12:38:50 +0100 Subject: [PATCH 16/21] More LLM questions --- prompts/LLM-questions.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/prompts/LLM-questions.txt b/prompts/LLM-questions.txt index 79fa9885541a7..36a2533bf2aee 100644 --- a/prompts/LLM-questions.txt +++ b/prompts/LLM-questions.txt @@ -8,7 +8,7 @@ In the context of LLMs, what is decoding? In the context of LLMs, what is encoding? In the context of LLMs, what is tokenizing? In the context of LLMs, what is an embedding? -In the context of LLMs, what is an quantization? +In the context of LLMs, what is quantization? In the context of LLMs, what is a tensor? In the context of LLMs, what is a sparse tensor? In the context of LLMs, what is a vector? @@ -25,7 +25,7 @@ In the context of neural nets, what is cross-entropy? In the context of neural nets, what is over-fitting? In the context of neural nets, what is under-fitting? What is the difference between an interpreted computer language and a compiled computer language? -What is a debugger? +In the context of software development, what is a debugger? When processing using a GPU, what is off-loading? When processing using a GPU, what is a batch? When processing using a GPU, what is a block? @@ -36,4 +36,9 @@ When processing using a GPU, what is a cache? When processing using a GPU, what is unified memory? When processing using a GPU, what is VRAM? When processing using a GPU, what is a kernel? -When processing using a GPU, what is "metal"? \ No newline at end of file +When processing using a GPU, what is "metal"? +In the context of LLMs, what are "Zero-Shot", "One-Shot" and "Few-Shot" learning models? +In the context of LLMs, what is the "Transformer-model" architecture? +In the context of LLMs, what is "Multi-Head Attention"? +In the context of LLMs, what is "Self-Attention"? +In the context of transformer-model architectures, how do attention mechanisms use masks? \ No newline at end of file From b505cfb3bcd157f641494e943c775415f280dac3 Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Wed, 4 Oct 2023 15:54:32 +0100 Subject: [PATCH 17/21] Update LLM-questions.txt --- prompts/LLM-questions.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prompts/LLM-questions.txt b/prompts/LLM-questions.txt index 36a2533bf2aee..9d47283e4e169 100644 --- a/prompts/LLM-questions.txt +++ b/prompts/LLM-questions.txt @@ -18,6 +18,8 @@ In the context of LLMs, what is "RoPe" and what is it used for? In the context of LLMs, what is "LoRA" and what is it used for? In the context of LLMs, what are weights? In the context of LLMs, what are biases? +In the context of machine-learning, what is "catastrophic forgetting"? +In the context of machine-learning, what is "elastic weight consolidation (EWC)"? In the context of neural nets, what is a hidden layer? In the context of neural nets, what is a convolution? In the context of neural nets, what is dropout? From e9aa6e9a08766876e8cbf9572e7b1384981df2d9 Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Thu, 5 Oct 2023 11:17:28 +0100 Subject: [PATCH 18/21] Yet more LLM-questions --- prompts/LLM-questions.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prompts/LLM-questions.txt b/prompts/LLM-questions.txt index 9d47283e4e169..fdf3d52f4416a 100644 --- a/prompts/LLM-questions.txt +++ b/prompts/LLM-questions.txt @@ -18,6 +18,9 @@ In the context of LLMs, what is "RoPe" and what is it used for? In the context of LLMs, what is "LoRA" and what is it used for? In the context of LLMs, what are weights? In the context of LLMs, what are biases? +In the context of LLMs, what are checkpoints? +In the context of LLMs, what is "perplexity"? +In the context of LLMs, what are models? In the context of machine-learning, what is "catastrophic forgetting"? In the context of machine-learning, what is "elastic weight consolidation (EWC)"? In the context of neural nets, what is a hidden layer? From 325fcb75ada276a49b5d1775180f48a15404a74e Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Thu, 5 Oct 2023 15:41:02 +0100 Subject: [PATCH 19/21] Remove jeopardy results file --- .../jeopardy/results/Llama2-7b-ggml-q4.txt | 657 ------------------ 1 file changed, 657 deletions(-) delete mode 100644 examples/jeopardy/results/Llama2-7b-ggml-q4.txt diff --git a/examples/jeopardy/results/Llama2-7b-ggml-q4.txt b/examples/jeopardy/results/Llama2-7b-ggml-q4.txt deleted file mode 100644 index b1ab6c3694194..0000000000000 --- a/examples/jeopardy/results/Llama2-7b-ggml-q4.txt +++ /dev/null @@ -1,657 +0,0 @@ - -Question: Which man born in 1932 was the son of a percussionist in the CBS radio orchestra has been nominated for 53 Oscars? -Answer: Alfred Hitchcock. ------- - -Question: What work in English Literature says: 'The mind is its own place, & in itself can make a heaven of hell, a hell of heaven. What matter where, if I be still the same'? - -I am looking for a quote from an English author that goes something like this: - -\begin{blockquote} - -The mind is its own place, and in itself can make a heaven of hell, a hell of heaven. -\end{blockquote} - -I have looked through the works of Shakespeare, Milton, Marlowe, Donne, Spenser, Ch ------- - -Question: Known for more philosophical works, he wrote the play 'La Mandragola', in which Florentines are rewarded for immoral actions? -Answer: Niccolò Machiavelli ------- - -Question: James Cook's account of a 1774 visit where records an object 'near 27 feet long, and upwards of 8 feet over the breast or shoulders'? - -I am trying to find out more about this object. I have found it mentioned in [this article](http://www.theguardian.com/science/2013/jun/29/giant-sea-creature-discovered-in-antarctic) and [this one](https://www.newscientist.com ------- - -Question: England's 'Bloody Assizes' & a 1685 life sentence for perjury were 2 main origins of which amendment to the U.S. Constitution? -Answer: The Fifth Amendment, which states that no person shall be "deprived of life, liberty or property without due process of law." -The Bloody Assizes was a series of trials held in 1685 by Judge Jeffreys to try those accused of involvement in the Monmouth Rebellion. The trials were conducted with little regard ------- - -Question: Which nobel peace price winners each lived at times on Vilakazi St. in Soweto , so it claims to be the world's only street home to 2 Nobel Peace Prize winners? -Answer: Nelson Mandela and Desmond Tutu ------- - -Question: In 1966, the year of who's death did he share plans for an experimental prototype community in Florida? -Answer: Robert C. Weaver (1907-1965) was a civil rights activist and politician. He served as U.S. Secretary of Housing and Urban Development from 1966 to 1968, under President Lyndon B. Johnson. -Weaver was born in Washington, D.C., the son of ------- - -Question: Of the 13 nations through which the Equator passes, what is the only one whose coastline borders the Caribbean Sea? -Answer: Ecuador. ------- - -Question: Which decorative items in fashion history get their name from their origin in the port city of Strasbourg, on the border of France & Germany? -Answer: The Strass. -The Strass is a type of beaded trimming that was popular in the late 19th century and early 20th century. It was made by sewing together small pieces of glass or metal to form a pattern. The name "Strass" comes from the French word for "street", which refers to the city of Strasbourg ------- - -Question: What 1980's movie is based on an off-Broadway play with just 3 characters and won the Best Picture Oscar & the actors in all 3 roles were nominated? -Answer: Ordinary People (1980) -The film was directed by Robert Redford, who also starred as Conrad Jarrett. The other two actors were Mary Tyrone and Donald Sutherland. ------- - -Question: A 2012 book review for which novelist noted subjects that 'sparked his ire': capital punishment, big tobacco & 'the plight of the unjustly convicted'? -I am looking for a book review from 2012 in which the author notes that he was inspired by the following subjects: -\begin{itemize} -\item Capital Punishment -\item Big Tobacco -\item The Plight of the Unjustly Convicted -\end{itemize} - -I believe this review is from a book published in ------- - -Question: A 1940 headline about what 20th Century Eponym included 'failure', 'liability when it came to offense' & 'stout hearts no match for tanks'? - -\begin{blockquote} - -A 1940 headline about what 20th Century Eponym included ‘failure’, ‘liability when it came to offense’ and ‘stout hearts no match for tanks’? -\end{blockquote} - -I'm looking for the answer to this question. I've tried searching online ------- - -Question: Over 700 years after its traditional 1252 founding date, what port city became associated with a psychological response? -Answer: The term "hubris" was coined in the 4th century BC by Athenian playwright Aeschylus. It is derived from Greek hubris (arrogance), which derives from the verb huberidzein, meaning to be proud or insolent. -The word has been used since classical times to describe a personality trait ------- - -Question: The success of what brand has its roots with a hydrotherapy pump its cofounder created for his son, who had arthritis? -The answer to the question "The success of what brand has its roots with a hydrotherapy pump its cofounder created for his son, who had arthritis?" is Show answer -tags: success brand roots hydrotherapy pump cofounder son arthritis -What is the name of the 1980s TV show that starred ------- - -Question: In a periodical in 1807, what American Author called New York City 'Gotham, Gotham! Most enlightened of cities'? -Answer: Washington Irving. ------- - -Question: What symbol is a rotated V in math and a feeling of some marginalized or underrepresented people in society? - -I'm looking for the name of this symbol. It looks like a rotated V, but I can't find it anywhere. - - - -Comment: What is the context? - -Comment: @Misha ------- - -Question: Monty Norman, the composer of what character's theme, said the staccato riff conveyed sexiness, mystery & ruthlessness? -Answer: James Bond. - -Comment: I think you mean "the composer of what character's theme" rather than "what character's theme". - -Comment: @JonathanAllan - I think it is correct as written. The question asks for the name of the composer, not the name of the character. - -Answer: \begin{blockquote} - ------- - -Question: What American Novelist served with an airman named Yohannan in World War II & despite what readers might think, he said he enjoyed his service? -Answer: John Steinbeck. He was a member of the US Navy's Pacific Theater and served as a writer for the military newspaper "The Pacific." ------- - -Question: In what Medieval place did one of the participants in an 1170 event say, 'Let us away, knights; he will rise no more'? -Answer: The Battle of Montgisard. - -Comment: I think you mean "Montgisard" and not "Montgisard". - -Comment: @JoeTaxpayer - You are correct! Thanks for the correction. ------- - -Question: At one time a province of the Roman Empire, what African country kingdom is known to Arabic scholars as Al-Maghrib Al-Aqsa, 'the far west'? -Answer: Morocco. ------- - -Question: Congress relented in 1890 after what prospective state said it would wait 100 years rather than come in without the women? - -\begin{blockquote} - -\strong{Possible Duplicate:} - - [What was the last state to be admitted into the United States?](https://history.stackexchange.com/questions/2486/what-was-the-last-state-to-be-admitted-into-the-united-states) -\end{ ------- - -Question: A writer & producer of what movie said he wanted it to be like a Western or James Bond film, 'only it takes place in the 30s'? - -A writer and producer of what movie said he wanted it to be like a Western or James Bond film, 'only it takes place in the 30s'? - -Answer: The Wachowskis' "Speed Racer" (2008) - -\begin{blockquote} - -The Wachowski brothers have said that they wanted to make ------- - -Question: In 1898 what's been called the first blockbuster art show was devoted to which artist & put on for Queen Wilhelmina's coronation? -Answer: Vincent Van Gogh. ------- - -Question: Part of the largest contiguous land empire during the 1200s & 1300s, today what is the world's second-largest landlocked country? -Answer: Kazakhstan. ------- - -Question: A 2006 book was titled 'The Poem That Changed America:' What 'Fifty Years Later'? - -A 2006 book was titled "The Poem That Changed America:" What 'Fifty Years Later'? - -I remember reading this book in high school, but I can't find it anywhere. It was a collection of poems by famous American authors, and the title poem was about how the author had been inspired to write his own poetry after reading ------- - -Question: Backed by 14,000 troops, who invaded England to restore, in his words, its 'religion, laws, and liberties'? - -Answer: Edward III of England. - -\begin{blockquote} - -In 1327, Edward III invaded France with a force of 14,000 men. He was - backed by the Pope who had excommunicated King Philip VI and declared - war on him. The invasion was unsuccessful and Edward returned to - ------- - -Question: After its completion in the late 19th c., what was landmark was called 'a truly tragic street lamp' & a 'high & skinny pyramid of iron ladders'? -Answer: The Eiffel Tower. - -Comment: I think this is a duplicate, but I can't find it. - -Comment: @Matthew Read - I don't see any other questions with the same answer. - -Comment: @MatthewRead - I don't see any other questions with the same answer. - -Answer: The E ------- - -Question: The busiest passenger port in the U.K., what shares its name with a capital of one of the original 13 states? -Answer: Southampton, England and New Hampshire, USA ------- - -Question: This man made lists, perhaps to cope with depression; a set of lists he published in 1852 made whose name synonymous with a type of book? - -\begin{blockquote} - -\strong{Possible Duplicate:} - - [What is the origin of the term “to-do list”?](https://english.stackexchange.com/questions/40691/what-is-the-origin-of-the-term-to-do-list) -\end{blockquote} - - ------- - -Question: An 1869 presidential pardon was granted to which man, due in part to a plea by the Medical Society of Harford County, Maryland? -Answer: Samuel Mudd. -Mudd was convicted for his role in the assassination of President Abraham Lincoln and sentenced to life imprisonment at hard labor. He was pardoned by President Andrew Johnson on Christmas Eve 1869. ------- - -Question: Letters, pocket knives, C rations & steel helmets are among the tangible items referred to in the title of what American literature modern war classic? -Answer: The Things They Carried by Tim O'Brien. ------- - -Question: What nonfiction book has the line, 'The discovery of America…opened up fresh ground for the rising bourgeoisie'? - -I read this in a book about the French Revolution. I think it was written by a Marxist author. The quote is from the preface to the book. - -Comment: It sounds like you are looking for a book that has a quote from the preface of another book, which is not really on topic here. - -Answer: This is a line from [The Commun ------- - -Question: A radical Republican championed what 1875 act but the Supreme Court struck it down in 1883; a new version was passed 81 years later? -A radical Republican championed what 1875 act but the Supreme Court struck it down in 1883; a new version was passed 81 years later? -Answer: The Sherman Antitrust Act. -The Sherman Antitrust Act of 1890 was an antitrust law that outlawed trusts and monopolies in ------- - -Question: Whose brothers, Castor & Pollux, saved her after Theseus stole her away as a kid; a larger force would seek her later in life? -Answer: The Dioscuri (Castor and Pollux) were the twin sons of Leda and Zeus. They were born at the same time but from different mothers. Castor was the son of Leda by her husband, Tyndareus, while Pollux was the son of Zeus. -The Dioscuri were known as the protectors of ------- - -Question: Once Africa's largest country in area, what African Country dropped to third in 2011 when a portion of it declared independence? -Answer: Sudan. The Republic of South Sudan was formed on July 9th, 2011 after the southern part of Sudan voted for secession in January 2011. ------- - -Question: The ancient writer Galen said books on ships arriving to what city's port were seized, originals kept & copies returned? -The ancient writer Galen said books on ships arriving to what city's port were seized, originals kept & copies returned? -Answer for the clue "The ancient writer Galen said books on ships arriving to what city's port were seized, originals kept & copies returned?", 4 letters: -We found one answer for the crossword clue "The ancient writer ------- - -Question: For a special 1970s cookbook, who provided one simple recipe–a can of Campbell's tomato soup & 2 cans of milk? -For a special 1970s cookbook, who provided one simple recipe–a can of Campbell's tomato soup & 2 cans of milk? -Answer: The book was called "The Joy of Cooking" by Irma S. Rombauer and Marion Rombauer Becker. It was first published in 1931, and ------- - -Question: Thought to descend from people of Southeast Asia, the Chamorro make up what U.S. territory’s largest ethnic group? -Answer: Guam ------- - -Question: In office from 2022, the president of what country has taken so many foreign trips a play on his name is 'Ferdinand Magellan Jr.'? -Answer: Ferdinand Marcos Jr. ------- - -Question: In 1939 which writer lived on Toulouse Street in the French Quarter & chose the professional name that bonded him to the South? -Answer: Tennessee Williams. ------- - -Question: What National Park is named for a river indigenous people called Mi tse a-da-zi, translated by French-speaking trappers as 'Pierre Jaune'? -Answer: Yellowstone National Park. ------- - -Question: In 2010 who introduced the 4-point shot, 35 feet from the basket? -Question: In 2010 who introduced the 4-point shot, 35 feet from the basket? -Answer: The NBA. -The NBA introduced a new rule in 2010 that allowed players to shoot a four point shot if they were behind the three point line and closer than 35 feet away from the basket. This was done to increase scoring ------- - -Question: Losses over Asia in the 1960s led to the establishment of the program known as what at a San Diego naval base in 1969? -Answer: The Pacific Missile Range Facility (PMRF) was established on the island of Kauai, Hawaii. It is used for testing and evaluating missiles and other weapons systems. ------- - -Question: A craft that visited what was named for Giotto, based on the story that 680 years earlier, the painter depicted it as the Star of Bethlehem? - -A craft that visited what was named for Giotto, based on the story that 680 years earlier, the painter depicted it as the Star of Bethlehem? - -The answer is the [Giotto's Bell Tower](https://en.wikipedia.org/wiki/Giotto%27s_Bell_Tower), but I can't ------- - -Question: In World War I, 'Cistern' & 'reservoir' were suggested names for what secret invention, but the British preferred this less clumsy monosyllable? -Answer: Submarine. ------- - -Question: Until 1806, some German nobles included among their honors the title of 'Elector' for their role in selecting this personage? -Answer: The Holy Roman Emperor. - -### Dummy answer -_No, that is not correct._ - -### Real answer -_The Holy Roman Emperor was elected by the Electors of the Holy Roman Empire._ - ------- - -Question: In 1904, wearing a harness, actress Nina Boucicault became the first to play what character onstage? -Answer: A horse. ------- - -Question: Alphabetically the first German city in encyclopedias, what was also the first one taken by the Allies in World War II? -Answer: Aachen. ------- - -Question: This Sanskrit word referring to a spoken word or phrase comes from a word for 'to think'? - -I am looking for the name of this Sanskrit word. It refers to a spoken word or phrase, and it is derived from a word meaning 'to think'. - -Comment: I don't know if you are aware that there are many words in English which have been borrowed from other languages. For example, "coup d'etat" comes from French ------- - -Question: 1917's 'Elements of Trench Warfare' said what Old West invention was 'difficult to destroy' & 'difficult to get through'? -Answer: The barbed wire fence. - -Comment: I think this is a duplicate, but I can't find it. - -Comment: @MikeEarnest - I don't see any other questions that are close matches for this one. If you do, please post the link here so we can vote to close as a duplicate. ------- - -Question: Mimi Reinhard, who never learned to type using more than 2 fingers, produced what in World War II with 1,100 names, including hers? -Answer: A book of poetry. ------- - -Question: Poseidon carried off the maiden Theophane & turned her into a ewe; their offspring was the source of what mythical object? -Answer: Aphrodite's girdle. ------- - -Question: Published in 2011, P.D. James' final novel, 'Death Comes to Pemberley', was a sequel to what novel from 200 years earlier? -Answer: "Pride and Prejudice" by Jane Austen ------- - -Question: 5 U.S. states have 6-letter names; only which 2 west of the Mississippi River border each other? - -\begin{blockquote} - - 5 U.S. states have 6-letter names; only which 2 west of the Mississippi River border each other? -\end{blockquote} - -Answer: The two states are - -\begin{blockquote} - - Arizona and New Mexico -\end{blockquote} - -Because they share a border, and both ------- - -Question: Originally relating to a story of suffering, what word now more commonly refers to strong emotion of any kind? - -I'm looking for the word that originally referred to a story of suffering but is now used to refer to any strong emotion. - -The original meaning was "a narrative of some great misfortune or calamity" (OED). - -Comment: I think you mean *emotional* rather than *emotive*. - -Answer: \strong ------- - -Question: The 2007 biopic called 'La Môme' in France, meaning 'The Kid', was released in the U.S. under what other French title? -Answer: La Vie en Rose ------- - -Question: Returning home in 1493, Columbus stopped in the Azores at an island with what name, also something he'd lost off the Haiti coast? -Answer: Santa Maria de la Palma (Santa Maria of the Peak) -Question: What is the only country to have been ruled by a woman and her daughter? -Answer: The Netherlands. Wilhelmina was Queen from 1890-1948, and Juliana from 1948-1980. -Question: In 1 ------- - -Question: Pskov & Nizhny Novgorod are 2 of the cities that have a fortress called what? - -Pskov & Nizhny Novgorod are 2 of the cities that have a fortress called what? - -Answer: Kremlin ------- - -Question: In the 1950s the New York Times said what author 'is writing about all lust' & his lecherous narrator 'is all of us'? - -In the 1950s, the New York Times said that a certain author was writing about "all lust" and his lecherous narrator "is all of us." - -The author is not Philip Roth. - -The author is not John Updike. - -The author is not Vladimir Nabokov. - -The author is not Norman ------- - -Question: At the winter solstice, the sun is in Sagittarius; it once appeared in what constellation, giving a geographic feature its name? -Answer: Capricornus. ------- - -Question: Mike Post combined the sound of a slamming jail door, an anvil & 100 men stomping on a floor for what television series that debuted in 1990? -Mike Post combined the sound of a slamming jail door, an anvil & 100 men stomping on a floor for what television series that debuted in 1990? -Answer: NYPD Blue ------- - -Question: Like Sir Thomas More, 3 16th century English queens are buried at what British location? -Answer: Westminster Abbey. - -### Hint - -The first queen was the wife of Henry VIII and the second was his daughter. The third was a granddaughter of Henry VII. ------- - -Question: In 1692 Increase Mather wrote, 'It were better that ten suspected' of these who 'escape, than that one innocent person be condemned'? - -_Increase Mather_, _A Seasonable Argument Against Pretended Witchcraft_ (1692): - -\begin{blockquote} - -It is a maxim in law, That it were better ten guilty persons should escape than that one innocent person should suffer. Such a principle would surely have been here highly acceptable. For if we suppose, that ------- - -Question: The Geography Mnemonic Mimal, sometimes said to be the silhouette of a chef or elf, stands for Minnesota, Iowa, Missouri, and what other 2 states? -Answer: Arkansas and Louisiana. ------- - -Question: What was first sold in 1908, at a price equivalent to about 7,000 today? - -What was first sold in 1908, at a price equivalent to about 7,000 today? - -Answer: The first car. - -The Ford Model T was introduced on October 1st, 1908 and cost $850 (about $23,000 in 2016 dollars). - -Comment ------- - -Question: The name of what author dead since 2013 now appears on books written by a former U.S. marshal & a former Apache helicopter pilot? -Answer: J. D. Salinger, who died in 2010. ------- - -Question: The artwork once known in France as 'la tapisserie de la Reine Mathilde' is better known as what? - -The artwork once known in France as 'la tapisserie de la Reine Mathilde' is better known as what? - -Answer: The Bayeux Tapestry ------- - -Question: In 2022 which pop star became the first woman to have a Billboard Top 10 album in 5 decades starting with the 1980s? -Answer: Madonna. ------- - -Question: In one 19th century translation, what female classic tale character 'perceived the dawn of day and ceased' speaking nearly 1,000 times? -Answer: The Wife of Bath. ------- - -Question: Ironically, though what company founded in the 1860s is Moore County, Tennessee's largest employer, Moore is a dry county? -Answer: The Jack Daniel Distillery. ------- - -Question: After a 1789 event, who wrote, 'My first determination was to seek a supply of…water at Tofoa, & afterwards to sail for Tongataboo'? - -After a 1789 event, who wrote, 'My first determination was to seek a supply of water at Tofoa, & afterwards to sail for Tongataboo'? - -Answer: James Cook - -\begin{blockquote} - - On 20 April 1769, the Endeavour ran aground on the Great Bar ------- - -Question: Laurence Olivier & Ernest Borgnine were considered for the lead role & Sergio Leone to direct for what film that turned 50 in 2022? -Answer: The Wild Bunch (1969) ------- - -Question: Until a 1903 secession, what country's contiguous territory spanned 2 continents? -Answer: The Russian Empire. - -Comment: I think you mean "contiguous" rather than "congruent". - -Comment: @JonathanAllan: I don't know if that's the right word, but it is a correct answer to the question as asked. - -Comment: @JonathanAllan: I'm not sure what ------- - -Question: Early in her career which foreign-born author translated romance novels into Spanish, often changing the dialogue to make the heroines smarter? -Answer: Isabel Allende. ------- - -Question: Saying it was stolen by Napoleon, self-styled Italian patriot Vincenzo Peruggia took what in 1911? -Answer: The Mona Lisa. - -### Hint - -The painting was recovered in 1913. ------- - -Question: Continuing a downward trend, in July 2022 what US body of water was at 27% capacity, its lowest level since 1937 when it was first being filled? -Answer: Lake Mead ------- - -Question: Each morning which goddess began her ride in her chariot across the sky ahead of her brother Sol, or Helios? -Answer: The answer is Eos. - -Comment: I'm not sure if this is a duplicate question, but it seems to be related to [this one](https://puzzling.stackexchange.com/questions/102895/each-morning-which-goddess-began-her-ride-in-her-chariot- ------- - -Question: Until the Civil War, the Jan. 8 date of what American battle of dubious military importance but big morale value was a national holiday? -Answer: The Battle of New Orleans (1815) ------- - -Question: Which children's book title character is told 'By the time you are real, most of your hair has been loved off your eyes drop out & you get shabby'? - -Which children's book title character is told 'By the time you are real, most of your hair has been loved off your eyes drop out & you get shabby'? - -Answer: The Cat in the Hat. - -\begin{blockquote} - -"You're a mess," said the Cat. "By the time you are real, most of ------- - -Question: In a TV reunion over 40 years in the making, Dolly Parton appeared as an angel named Agnes in the final episode of what comedy in 2022? -Answer: The Last O.G. ------- - -Question: In an 1847 American poem what character sees her town of Grand-Pré burned, but finally reunites with her beau for a kiss before his death? - -In an 1847 American poem what character sees her town of Grand-Pré burned, but finally reunites with her beau for a kiss before his death? - -Answer: - -\begin{blockquote} - - \em{Anne of Green Gables} by L. M. Montgomery -\end{blockquote} ------- - -Question: In 2001 who published a book called 'Banging Your Head Against a Brick Wall'; in 2002, 'Existencilism'? - -In 2001 who published a book called 'Banging Your Head Against a Brick Wall'; in 2002, 'Existencilism'? - -Comment: I think this is a duplicate of [this question](https://puzzling.stackexchange.com/questions/68945/who-published-a- ------- - -Question: The title object of what childrens book 'never looked more beautiful each strand held dozens of bright drops of early morning dew'? - -The title object of what children's book 'never looked more beautiful each strand held dozens of bright drops of early morning dew'? - -Answer: The answer is "The Wind in the Willows" by Kenneth Grahame. - -\begin{blockquote} - -"The Mole had long been proud of his tail, which was really ------- - -Question: The shouts of excited children at a 1946 holiday parade are said to have inspired what perennial classic song favorite? -Answer: Jingle Bells. ------- - -Question: Unable to make what candies perfectly round, the confectioner embraced this flawed name for the product? -Answer: Jelly Beans. - -Comment: I'm not sure if it is a joke or not but I think that jelly beans are perfectly round. - -Comment: @MatthewWoodland - They're not, they're oblong. - -Comment: @MatthewWoodland - The question says "perfectly round ------- - -Question: What country is home to 58 UNESCO World Heritage Sites, more than any other country; the sites include a volcano & a lagoon? -Answer: Italy. ------- - -Question: What action movie's last line is 'If this is their idea of Christmas, I gotta be here for New Years'? - -I remember watching a movie where the main character was in a bar and he said that line. It was an action movie with a lot of explosions and gunfights. The main character was a man who had been wronged by someone and was seeking revenge. I think it might have been a western, but I'm not sure. - -Comment: This is a very ------- - -Question: Only 3 presidents have married while in office— John Tyler was the first & which one was the last? -Answer: Ronald Reagan. - -Comment: I'm not sure if this is a duplicate, but it seems to be related to [this question](https://puzzling.stackexchange.com/questions/102895/how-many-us-presidents-have-been-married). - -Answer: \section{John Tyler ------- - -Question: Demonstrating the dignity & humanity of Black Americans, who sat for 160 known photographs, the most of any American in the 19th century? - -I'm looking for a good book or article that demonstrates the dignity and humanity of Black Americans during the 1840-1870 period. - -The best I can find is this: -\begin{itemize} -\item [African American Photographs from the 19th Century](http://www.loc.gov ------- - -Question: Originally, which Latin 3-word phrase referred to when a doctor or apothecary substituted one medicine for another? -Answer: ______ _______ ________ - -Comment: I'm not sure if this is the right place to ask this question. If it isn't, please let me know where I should post it. - -Comment: @JoeBlow - It's fine here. - -Answer: \strong{Substitutum} - -From [ ------- - -Question: The 1975 premiere of what movie comedy advertised free coconuts for the first thousand in the audience? -Answer: "The Groove Tube" was a 1974 American television special that premiered on NBC. It was written and directed by Ken Shapiro, who also starred in it with Chevy Chase, Richard Belzer, Laraine Newman, Patricia Charbonneau, John Candy, and others. The show was a par ------- - -Question: A cocktail, an island & a WWII venture originally called 'Development of Substitute Materials' all bear what name? -Answer: Daiquiri -The Daiquiri is a cocktail made with rum, lime juice and sugar. It was invented by Jennings Cox in the 19th century at the mining town of Daiquiri in Cuba. The drink became popular during Prohibition in the United States when it was served at the famous New York City ------- - -Question: Which US President was sworn in twice as President within 2 years, first by his father & then later by a former U.S. President? -Answer: John Tyler (1790-1862) -John Tyler was the tenth president of the United States and the first vice president to become president after the death of the incumbent president. He was born in 1790, the son of a Virginia governor. His father died when he was ten years old, and his mother remar ------- - -Question: A 1609 story in which an exiled king of Bulgaria creates a sea palace with his magic may have inspired the plot of what play? -Answer: The Tempest. ------- - -Question: In 2009, during a 20th anniversary celebration, what landmark was called 'an edifice of fear. On Nov. 9, it became a place of joy'? -Answer: The Berlin Wall ------- - -Question: Among what world capital's nicknames are the 'City of Classical Music' &, possibly in honor of a famous resident from 1860 to 1938, the 'City of Dreams'? -Answer: Vienna (Austria) ------- - -Question: Now meaning someone with nocturnal habits, what catches a sleeping dove in Shakespeare's 'Lucrece'? - -In Shakespeare's \em{The Rape of Lucrece}, the character Tarquin is described as having "nocturnal habits" (line 102). Later, he says: - -\begin{blockquote} - -I am a man that, by my will, - - Can do a great deal. - - I have noct ------- - -Question: The stars on what country's flag represent states, 26 of them; unlike the USA's, its 'federal district' gets its own 27th star? -I saw a flag with 26 stars in a row and then one more at the top. I think it was a US state flag but I can't remember which one. -The stars on what country's flag represent states, 26 of them; unlike the USA's, its 'federal district' gets its own 27th star? -I ------- - -Question: What father was the only man among the 13 plaintiffs in a US class-action case filed in 1951? -Answer: The father of the 13 plaintiffs was the only man. -The case was Brown v Board of Education, and it was the first time that the Supreme Court ruled that segregation of schools on the basis of race was unconstitutional. ------- - -Question: Reversing the story of what heroine she created, childrens author Patricia Maclachlan was born on the prairie but spent much of her life in New England? -Answer: She was born in North Dakota and moved to Massachusetts when she was a teenager. ------- From 8b7d88afff18d0fb77e814579295e02f09d81057 Mon Sep 17 00:00:00 2001 From: pudepiedj Date: Fri, 6 Oct 2023 09:54:32 +0100 Subject: [PATCH 20/21] Reinstate original jeopardy.sh --- examples/jeopardy/jeopardy.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/jeopardy/jeopardy.sh b/examples/jeopardy/jeopardy.sh index 63544f562d718..9bdbc755c13a7 100755 --- a/examples/jeopardy/jeopardy.sh +++ b/examples/jeopardy/jeopardy.sh @@ -1,11 +1,11 @@ #!/bin/bash set -e -MODEL=./models/llama-2-7b/ggml-model-q4_0.gguf -MODEL_NAME=Llama2-7b-ggml-q4 +MODEL=./models/ggml-vicuna-13b-1.1-q4_0.bin +MODEL_NAME=Vicuna # exec options -prefix="Question: " # Ex. Vicuna uses "Human: " +prefix="Human: " # Ex. Vicuna uses "Human: " opts="--temp 0 -n 80" # additional flags nl=' ' @@ -13,7 +13,6 @@ introduction="You will be playing a game of Jeopardy. Simply answer the question # file options question_file=./examples/jeopardy/questions.txt -# if the required model file doesn't exist, create it; otherwise update it touch ./examples/jeopardy/results/$MODEL_NAME.txt output_file=./examples/jeopardy/results/$MODEL_NAME.txt @@ -22,7 +21,7 @@ counter=1 echo 'Running' while IFS= read -r question do - exe_cmd="./build/bin/main -p "\"$nl$prefix$question\"" "$opts" -m ""\"$MODEL\""" >> ""\"$output_file\"" + exe_cmd="./main -p "\"$prefix$introduction$nl$prefix$question\"" "$opts" -m ""\"$MODEL\""" >> ""\"$output_file\"" echo $counter echo "Current Question: $question" eval "$exe_cmd" From 4bded6e23c379179022dd781db38b235b2a7f31e Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Fri, 6 Oct 2023 16:15:57 +0300 Subject: [PATCH 21/21] Update examples/parallel/parallel.cpp --- examples/parallel/parallel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/parallel/parallel.cpp b/examples/parallel/parallel.cpp index 25ca2d06342d6..721888da7de94 100644 --- a/examples/parallel/parallel.cpp +++ b/examples/parallel/parallel.cpp @@ -401,8 +401,8 @@ int main(int argc, char ** argv) { if (params.prompt_file.empty()) { params.prompt_file = "used built-in defaults"; } - printf("External prompt file: \033[32m%s\033[0m\n", params.prompt_file.c_str()); - printf("Model and path used: \033[32m%s\033[0m\n\n", params.model.c_str()); + LOG_TEE("External prompt file: \033[32m%s\033[0m\n", params.prompt_file.c_str()); + LOG_TEE("Model and path used: \033[32m%s\033[0m\n\n", params.model.c_str()); LOG_TEE("Total prompt tokens: %6d, speed: %5.2f t/s\n", n_total_prompt, (double) (n_total_prompt ) / (t_main_end - t_main_start) * 1e6); LOG_TEE("Total gen tokens: %6d, speed: %5.2f t/s\n", n_total_gen, (double) (n_total_gen ) / (t_main_end - t_main_start) * 1e6);