From e03b14259f07c52542d32290a3ac18ff21e97f3a Mon Sep 17 00:00:00 2001 From: movchan74 Date: Fri, 27 Oct 2023 10:55:52 +0000 Subject: [PATCH] Added PAT for checkout --- notebooks/demo.ipynb | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/notebooks/demo.ipynb b/notebooks/demo.ipynb index 9f3c4878..737a2436 100644 --- a/notebooks/demo.ipynb +++ b/notebooks/demo.ipynb @@ -12,45 +12,46 @@ }, { "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [], - "source": [ - "data = {\n", - " 'prompt': '[INST] Who is Elon Musk? [/INST]',\n", - " 'sampling_params' : {\n", - " 'temperature': 0.9,\n", - " }\n", - "}\n", - "\n", - "url = 'http://127.0.0.1:8000/llm/generate'" - ] - }, - { - "cell_type": "code", - "execution_count": 7, + "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'vllm_llama2_7b_chat_output': ' Elon Musk is a South African-born entrepreneur, inventor, and business magnate who is best known for being the CEO of SpaceX and Tesla, Inc. He is one of the most successful and influential entrepreneurs of the 21st century, known for his innovative ideas, visionary leadership, and his ability to bring those ideas to life.\\nMusk was born on June 28, 1971, in Pretoria, South Africa. He developed an interest in computing and programming at an early age and taught himself computer programming. He moved to Canada in 1992 to attend college, and later transferred to the University of Pennsylvania, where he graduated with a degree in economics and physics.\\nAfter college, Musk moved to California to pursue a career in technology and entrepreneurship. He co-founded his first company, Zip2, which provided online content publishing software for news organizations. In 1999, he co-founded X.com, which later became PayPal, an online payment system that was acquired by eBay for $1.5 billion in 2002.\\nIn 2',\n", + "{'vllm_llama2_7b_chat_output': ' Elon Musk is a South African-born entrepreneur, inventor, and business magnate. He is best known for his involvement in revolutionizing multiple industries through his companies, including transportation, energy, and space exploration. Here are some key facts about Elon Musk:\\n\\n1. Early Life and Education: Musk was born on June 28, 1971, in Pretoria, South Africa. He developed an interest in computing and programming at an early age and taught himself computer programming. He moved to Canada in 1992 to attend college, and later transferred to the University of Pennsylvania, where he graduated with a degree in economics and physics.\\n2. Entrepreneurial Career: Musk co-founded his first company, Zip2, which provided online content publishing software for news organizations. In 1999, he co-founded X.com, which later became PayPal, an online payment system that was acquired by eBay for $1.5 billion in 2002.\\n3. SpaceX: In 2002, Musk founded SpaceX, a private aerospace manufacturer and',\n", " 'execution_time': {'prompt': 0,\n", " 'sampling_params': 0,\n", " 'vllm_stream_llama2_7b_chat': 0,\n", - " 'vllm_llama2_7b_chat': 4.421537399291992}}" + " 'vllm_llama2_7b_chat': 3.8096983432769775}}" ] }, - "execution_count": 7, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ + "data = {\n", + " 'prompt': '[INST] Who is Elon Musk? [/INST]',\n", + " 'sampling_params' : {\n", + " 'temperature': 0.9,\n", + " }\n", + "}\n", + "\n", + "url = 'http://127.0.0.1:8000/llm/generate'\n", + "\n", + "# response = requests.post(url, data={'body': json.dumps(data)})\n", "response = requests.post(url, json=data)\n", "response.json()" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": null,