o e4f@s>ddlZddlZddlmZmZmZmZmZgdZidgddddgdgd d gd d d dgddgdgdgddgdgdgddgdddgdddgdd d!gd"d#gd$d%gid&d'gd(gd)d*gd+d,d-d.gd/gd0d1d2gd3d4gd5d6d7gd8gd9d:gd;dgd?gd@dAdBdCgdDdEgdFdGgdHgdIgdJgdKdLggdMdNgdOgdPggdQgdRgdSggdTgdUdVgdWgdXZ e e Z e e dY<e e Z e e dZ<e e Zee d[<gd\Zgd]eZee Ze gd^ed_ed`g7Zdadbe DZdcdbe DZgZeD] Zeejgq0gZeD]Zeejejeejgq? d eddfdgZ  eddhdiZddjdkZ Gdldmdme!Z"dndoZ#dpdqZ$drdsZ%dtduZ&gfdvdwZ'dxZ(dyZ)dzZ*d{Z+d|Z,d}Z-d~Z.dZ/dZ0dZ1ddZ2ddZ3dS)N) PromptTypegpt_token_mappinganthropic_mappinggoogle_mappingmistralai_mapping) gpt4all_llamallamagptjplain)"zEleutherAI/gpt-j-6BzEleutherAI/pythia-6.9bzEleutherAI/pythia-12bzEleutherAI/pythia-12b-dedupedzEleutherAI/gpt-neox-20bz+openlm-research/open_llama_7b_700bt_previewzdecapoda-research/llama-7b-hfzdecapoda-research/llama-13b-hfzdecapoda-research/llama-30b-hfzdecapoda-research/llama-65b-hfz(facebook/mbart-large-50-many-to-many-mmtz philschmid/bart-large-cnn-samsumzphilschmid/flan-t5-base-samsumgpt2 distilgpt2zmosaicml/mpt-7b-storywriterztiiuae/falcon-7bztiiuae/falcon-40bztiiuae/falcon-180Bzmeta-llama/Llama-2-7bzmeta-llama/Llama-2-13bzmeta-llama/Llama-2-70bzh2oai/h2ogpt-4096-llama2-7bzh2oai/h2ogpt-4096-llama2-13bzh2oai/h2ogpt-4096-llama2-70bzh2oai/h2ogpt-16k-codellama-7bzh2oai/h2ogpt-16k-codellama-13bzh2oai/h2ogpt-16k-codellama-34bz$h2oai/h2ogpt-16k-codellama-7b-pythonz%h2oai/h2ogpt-16k-codellama-13b-pythonz%h2oai/h2ogpt-16k-codellama-34b-pythonz%h2oai/h2ogpt-32k-codellama-34b-pythonzmistralai/Mistral-7B-v0.1zmistralai/Mixtral-8x7B-v0.1r r prompt_answer) z"h2oai/h2ogpt-gm-oasst1-en-1024-20bz"h2oai/h2ogpt-gm-oasst1-en-1024-12bz)h2oai/h2ogpt-gm-oasst1-multilang-1024-20bz/h2oai/h2ogpt-gm-oasst1-multilang-2048-falcon-7bz2h2oai/h2ogpt-gm-oasst1-multilang-2048-falcon-7b-v2z+h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v3z(h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7bz+h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v2z,h2oai/h2ogpt-gm-oasst1-en-2048-falcon-40b-v1z,h2oai/h2ogpt-gm-oasst1-en-2048-falcon-40b-v2z$h2oai/h2ogpt-gm-oasst1-en-xgen-7b-8kz+h2oai/h2ogpt-gm-oasst1-multilang-xgen-7b-8kz4TheBloke/h2ogpt-gm-oasst1-en-2048-falcon-40b-v2-GPTQprompt_answer_openllama)z:h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-7b-preview-300btz=h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-7b-preview-300bt-v2z:h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-7b-preview-700btz,h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-7bz-h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-13binstructz,TheBloke/llama-30b-supercot-SuperHOT-8K-fp16zTheBloke/Nous-Hermes-13B-GPTQinstruct_with_endzdatabricks/dolly-v2-12bquality human_bot) zh2oai/h2ogpt-oasst1-512-12bzh2oai/h2ogpt-oasst1-512-20bz h2oai/h2ogpt-oig-oasst1-256-6_9bz h2oai/h2ogpt-oig-oasst1-512-6_9bz h2oai/h2ogpt-oig-oasst1-256-6.9bz h2oai/h2ogpt-oig-oasst1-512-6.9bz$h2oai/h2ogpt-research-oasst1-512-30bz&h2oai/h2ogpt-research-oasst1-llama-65bzh2oai/h2ogpt-oasst1-falcon-40bz"h2oai/h2ogpt-oig-oasst1-falcon-40bzllmware/dragon-mistral-7b-v0dai_faq summarizesimple_instruct)zt5-smallzt5-largezgoogle/flan-t5zgoogle/flan-t5-xxlzgoogle/flan-ul2instruct_vicuna)zAlekseyKorshuk/vicuna-7bzTheBloke/stable-vicuna-13B-HFzjunelee/wizard-vicuna-13bhuman_bot_origz(togethercomputer/GPT-NeoXT-Chat-Base-20Bopen_assistantz'OpenAssistant/oasst-sft-7-llama-30b-xorzoasst-sft-7-llama-30b wizard_lmz ehartford/WizardLM-7B-Uncensoredz!ehartford/WizardLM-13B-Uncensored wizard_megaz(openaccess-ai-collective/wizard-mega-13binstruct_simplezJosephusCheung/Guanaco wizard_vicunaz&ehartford/Wizard-Vicuna-13B-Uncensored mptinstruct)mosaicml/mpt-30b-instructzmosaicml/mpt-7b-instructrmptchat)zmosaicml/mpt-7b-chatzmosaicml/mpt-30b-chatzTheBloke/mpt-30B-chat-GGMLorca2zTheBloke/Orca-2-13B-GGUFzmicrosoft/Orca-2-13bvicuna11)zlmsys/vicuna-33b-v1.3zlmsys/vicuna-7b-v1.5zlmsys/vicuna-13b-v1.5zNousResearch/Nous-Capybara-34B vicuna11nosyslmsys/vicuna-13b-v1.5-16kone_shotzlmsys/fastchat-t5-3b-v1.0falconztiiuae/falcon-40b-instructztiiuae/falcon-7b-instructllama2)zmeta-llama/Llama-2-7b-chat-hfzmeta-llama/Llama-2-13b-chat-hfzmeta-llama/Llama-2-34b-chat-hfzmeta-llama/Llama-2-70b-chat-hfz"h2oai/h2ogpt-oasst1-4096-llama2-7bz#h2oai/h2ogpt-oasst1-4096-llama2-13bz#h2oai/h2ogpt-oasst1-4096-llama2-70bzTheBloke/Llama-2-7b-Chat-GPTQzTheBloke/Llama-2-7b-chat-fp16zTheBloke/Llama-2-13b-chat-fp16zTheBloke/Llama-2-70b-chat-fp16z h2oai/h2ogpt-4096-llama2-7b-chatz!h2oai/h2ogpt-4096-llama2-13b-chatz!h2oai/h2ogpt-4096-llama2-70b-chatz&h2oai/h2ogpt-16k-codellama-7b-instructz'h2oai/h2ogpt-16k-codellama-13b-instructz'h2oai/h2ogpt-16k-codellama-34b-instruct'h2oai/h2ogpt-32k-codellama-34b-instructTheBloke/Llama-2-70B-chat-AWQz&h2oai/h2ogpt-4096-llama2-70b-chat-4bitr(zTheBloke/Llama-2-13B-chat-AWQYukang/LongAlpaca-70BTheBloke/Llama-2-7B-Chat-GGUFmistral)z"mistralai/Mistral-7B-Instruct-v0.1z&TheBloke/Mistral-7B-Instruct-v0.1-GGUFz"mistralai/Mistral-7B-Instruct-v0.2z&TheBloke/Mistral-7B-Instruct-v0.2-GGUFmixtral)z$mistralai/Mixtral-8x7B-Instruct-v0.1z(TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUFz(TheBloke/Mixtral-8x7B-Instruct-v0.1-GPTQz'TheBloke/Mixtral-8x7B-Instruct-v0.1-AWQ mixtralnosyszephyr)zHuggingFaceH4/zephyr-7b-alphaHuggingFaceH4/zephyr-7b-betaTheBloke/zephyr-7B-beta-GGUFTheBloke/zephyr-7B-beta-AWQzzephyr-7b-beta.Q5_K_M.ggufbelugazstabilityai/StableBeluga2zpsmathur/orca_mini_v3_7bwizard3nospacezWizardLM/WizardLM-13B-V1.2 falcon_chatztiiuae/falcon-180B-chatxwin)zXwin-LM/Xwin-LM-13B-V0.1TheBloke/Xwin-LM-13B-V0.1-GPTQzTheBloke/Xwin-LM-13B-v0.2-GPTQzXwin-LM/Xwin-LM-70B-V0.1)zXwin-LM/XwinCoder-7BzXwin-LM/XwinCoder-13BzXwin-LM/XwinCoder-34B)zXwin-LM/Xwin-Math-7B-V1.0zXwin-LM/Xwin-Math-70B-V1.0zXwin-LM/Xwin-Math-13B-V1.0zamazon/MistralLite)z h2oai/h2ogpt-16k-aquilachat2-34bzBAAI/AquilaChat2-34B-16KzBAAI/AquilaChat2-34B-16kzBAAI/AquilaChat2-7B-16KzBAAI/AquilaChat2-34BzBAAI/AquilaChat2-7Bz#TheBloke/em_german_leo_mistral-GPTQ)z(deepseek-ai/deepseek-coder-1.3b-instructz(deepseek-ai/deepseek-coder-6.7b-instructz'deepseek-ai/deepseek-coder-33b-instruct)openchat/openchat_3.5zTheBloke/openchat_3.5-GPTQzTheBloke/openchat_3.5-GGUFzTheBloke/openchat_3.5-AWQzTheBloke/openchat_3.5-16k-AWQzopenchat_3.5.Q5_K_M.ggufzNurtureAI/openchat_3.5-16k)z"berkeley-nest/Starling-LM-7B-alphazopenchat/openchat-3.5-1210r7zopenchat/openchat_v3.2_superzcore42/jais-30b-chat-v1z01-ai/Yi-34B-ChatzTheBloke/Yi-34B-Chat-AWQzArc53/docsgpt-7b-mistral) xwincoderxwinmath mistralliteaquila aquila_legacy aquila_v1 mistralgermandeepseek_coder open_chatopen_chat_correctopen_chat_codeopen_chat_mathjaisyidocsgpt anthropicgoogle mistralai)r)r#r')r6r*r/r0r1)ztext-davinci-003ztext-curie-001ztext-babbage-001z text-ada-001)openai openai_chatz gpt-3.5-turbocCs$i|]\}}|D]}||qqS)strip.0klvrLrL/h2ogpt/src/prompter.py s$rTcCs(i|]\}}|D] }||qqSrL)rMlowerrNrLrLrSrTs(Fc#Cs>d}d} d} |tjjkr/t|ts/zt|}Wnty.} z t| }WYd} ~ nd} ~ ww|rId} d} d}d}d}d}d}d}d}d}d} n|tjj ttjj tjjfvr| dd} | dd} | dd}| dd}| dd}| dd}| d d }| d d }| d d}| d d} n|tj j ttj j tj jfvrd} } }}}g}d}}d}d} n|dkrd} } }}}g}d }}d}d} n|tj j ttj j tj jgtj j ttj j tj jgvr$|sdnd} |sdnd} d}d}d}|tj j ttj j tj jfvrdg}nd}d }}|}|} nC|tjj ttjj tjjfvrT|s9dnd} |s@dnd} d}d}d}d}d }}|}|} n|tjj ttjj tjjgtjj ttjj tjjgvrd}d}|s|s|tjj ttjj tjjfvrd}ntd}td}d}|||}d}d||f} } |d}d}|r|d}n|}d |d ||||g}d }}|}|}d} n|tjj ttjj tjjfvrd} d} d }d}d!}d"g}|}}|}|} no|tjj ttjj tjjfvrd} } }d#}d$}d}d }}|}|} nI|tjj ttjj tjjfvrTd} |d%vr7d&}|s<|nd} } d'}d}d(}gd)}d }}|}|} n|tjj ttjj tjjfvrd}d*}d+}d}d||f} } |}d}|}d,}|}|}|||g}|}|} n|tjj ttjj tjjfvrd}d*}d+}d}d||f} } |}d}|}d-}|}|}|||g}|}|} n|tjj ttjj tjjfvrd}d.}d/}d}d||f} } |}d}|}d0} d-}|}|}||| |g}|}} nk|tjj ttjj tjjfvr.d}d}d||f} } d}d}d1}d-}||g}|}}| }|} n9|tjj ttjj tjjfvr]d}d}d||f} } d}d}d(}|g}d }}|}|} n |tjj ttjj tjjfvr|srdnd} } d2}d}d3}d4g}d }}|}|} n|tjj ttjj tjjfvr|sdnd} } d5}d}d(}d6g}d }}|}|} n|tjj ttjj tjjfvrd} |d%vrd7}|sd8|nd}d}d||f} } d}d}d}|g}d }}|}|} ns|tjj ttjj tjjfvr3d} |d%vr d9}|sd8|nd}d}d||f} } d:}d}d;}|g}d }}|}|} n4|tj j ttj j tj jfvrbd}d}d||f} } d:}d}d;}|g}d }}|}|} n|tj!j ttj!j tj!jfvr|swdnd} } d}d}d}d}d }}|}|}n|tj"j ttj"j tj"jfvrd} |d%vrd<}|sd8|nd}d}d||f} } d=}d}d>}|gd?d@g}d }}|}|}n|tj#j ttj#j tj#jfvr|sdAnd}d}d||f} } dB}d}dC}|gdDdEg}d }}|}|}n_|tj$j ttj$j tj$jfvsH|tj%j ttj%j tj%jfvsH|tj&j ttj&j tj&jfvsH|tj'j ttj'j tj'jfvrd} d}d}d||f} } d}d}d}g}d }}d}d}|tj&j ttj&j tj&jfvr}|dFkr}dG}n|tj(j ttj(j tj(jfvs|tj)j ttj)j tj)jfvr|tj(j ttj(j tj(jfv} |d%vrd9}| sd}n |sdH|nd}d}d||f} } d-}d:}d}dI}|g}d}|}|}|}|r|d}n}|}ny|tj*j ttj*j tj*jfvr$d} |d%vrd7}|sdJ|nd} } dK}dL}dM}d}d }}|}|}nC|tj+j ttj+j tj+jfvr[d} |d%vr=dN}|sDdO|nd} } dP}d}dQ}dRg}d}dR}|}|}n |tj,j ttj,j tj,jfvrd} |d%vrtdS}|s{dO|nd} } dP}d}dQ}dRg}d}dR}|}|}n|tj-j ttj-j tj-jfvr|sdnd} } dT}d}dU}dVd,g}d"}d"}|}|}|rdW}n|}n|tj.j ttj.j tj.jfvr|sdnd} } dX}d}dY}dZg}d }}|}|}ns|tj/j ttj/j tj/jfvrPd} |d%vr d[}|rd\|}!nd}!|sd} } nd} } d}d]}|r/|d^ks5|s9|s9||!7}d_}d`d-g}d}da}d`}d_}|rN|d7}n|tj0j ttj0j tj0jfvrd} |d%vridb}|rqdc|}!nd}!|!r~|s~|!} } nd} } d}dd}d(}dYd-g}d }d"}d6}dY}n|tj1j ttj1j tj1jfvr|sd9nd}d}d||f} } d:}d}dI}|g}d }}|}|}n|tj2j ttj2j tj2jfvr|sdend} } df}d}dg}gd)}d }}|}|}np|tj3j ttj3j tj3jfvrDd} |d%vrdh}|rdi|}!nd}!|!r%|s%|!} } nd} } dT}d}dj}gdk}d }d }|}|}|rB|d}n#|tj4j ttj4j tj4jfvrd} } d}dl}|rd|d^ksj|sn|sndm|}d_}d`d-g}d}dn}d`}d_}|r|d7}n|tj5j ttj5j tj5jfvs|tj6j ttj6j tj6jfv r|tj5j ttj5j tj5jfvrd} |d%vrdo}|rd\|}!nd}!nd}!|!r|s|!} } nd} } d}dl}|r|d^ks|s|sdp|}d_}d`d-g}d}dn}d`}d_}| r|d7}n`|tj7j ttj7j tj7jfv rMd} |d%v r do}| r(dq|}!nd}!|! r5| s5|!} } nd} } d}dr}ds}d/d-g}d }dt}du}d/}n|tj8j ttj8j tj8jfv rd} |d%v rfdo}| rndv|}!nd}!|! r{| s{|!} } nd} } d}dw}ds}d/d-g}d}dt}du}d/}n|tj9j ttj9j tj9jfv rd} |d%v rd9}| sdH|nd}d}d||f} } d:}d}dI}|dId-g}d }d }|}|}| r|d}n|tj:j ttj:j tj:jfv r#d} |d%v rdx}| sdy|nd}d}d||f} } dz}d}d{}|d{d-g}d }d }|}|}| r!|d}nD|tj;j ttj;j tj;jfv rkd} |d%v rj ttj>j tj>jfv r,d} |d%v rd&}| s d~|nd} } d}d}dU}gd}d-}d}|}|}| r*|d}n;|tj?j ttj?j tj?jfv rkd} |d%v rEd&}| sLd8|nd} } d}d}d}gd}d}d}|}|}| ri|d}n|tj@j ttj@j tj@jfv rd} |d%v rd}| sd8|nd} } dX}d}dY}gd}d-}d }|}|} |d}n|tjAj ttjAj tjAjfv r| sdnd} } d}d}d}d-d,g}d-}d}|}|}| r|d}n|tjBj ttjBj tjBjfv rd} |d%v rd}| sd8|nd} } d}d}d}d}||dg}d }d}|}|}| r|d7}nI|tjCj ttjCj tjCjfv s^|tjDj ttjDj tjDjfv s^|tjEj ttjEj tjEjfv s^|tjFj ttjFj tjFjfv rd} } d}|tjCj ttjCj tjCjfv ryd}d}n.|tjDj ttjDj tjDjfv rd}d}n|tjFj ttjFj tjFjfv rd}d}nd}d}d}||g}|}|}|}|}| r|d7}n|tjGj ttjGj tjGjfv rd} |d%v rd}| sd|nd} } d}d}d}| r|d7}|g}d}}|}|}nm|tjHj ttjHj tjHjfv r1d} |d%v rdN}| sd|nd} } d}d}d}dRdg}d}dR}|}|}n6|tjIj ttjIj tjIjfv rad} |d%v rJd7}d} } d}d}d}ddg}d }}|}|}ntJd|t|tKtLf rxd|v sxJd|dFk rd}t| | ||||||||| || d }"| r|"|fStKtL|"MS)NFpromptApromptB PreInstructPreInput PreResponseterminate_responsechat_sep chat_turn_sephumanstrbotstrrzBelow is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request. zjBelow is an instruction that describes a task. Write a response that appropriately completes the request. z ### Instruction: z ### Input: z ### Response: z### EndzWrite a detailed high-quality, accurate, fair, Response with about 100 words by following the Instruction as applied on the Input. zkWrite a detailed high-quality, accurate, fair, Response with about 100 words by following the Instruction. z:z:z%Y-%m-%dz%H:%M:%S %p %Zz#Current Date: {} Current Time: {} z%s%s Tz-Answer the following Driverless AI question. z. ### Driverless AI frequently asked question: z) ### Driverless AI documentation answer:  z## Main Text z ## Summary )NNoneautozA chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.z ### Human: z ### Assistant: ) ### Human:z ### Human: z ### Human:z### Assistant:z <|prompt|>z <|answer|> <|endoftext|>z <|prompter|>z <|assistant|>z<|prefix_end|>z ### Response z HUMAN: z ASSISTANT: zHUMAN:z ### User: z ### User:ziBelow is an instruction that describes a task. Write a response that appropriately completes the request.z%szA chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.zUSER: z ASSISTANT: ztThe following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.z Human: z AI:z Human:z AI:z### Instruction: The prompt below is a question to answer, a task to complete, or a conversation to respond to; decide which and write an appropriate response.z ### Prompt: z ### Response: zPrompt:z Response:rfzGI am a helpful assistant. I will accurately answer all your questions.z%s z ASSISTANT:z%s z ### Instruction z ### Input z ### Response zlA conversation between a user and an LLM-based AI assistant. The assistant gives helpful and honest answers.z <|im_start|>system %s <|im_end|>z<|im_start|>user z <|im_end|><|im_start|>assistant z <|im_end|>zYou are Orca, an AI language model created by Microsoft. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior.zUser: z Assistant:z Userz Assistant: z ### Human: z### Assistant:rgaYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.z<> %s <> z [INST] rz[/INST]z[INST]z zYou are Stable Beluga, an AI that follows instructions extremely well. Help as much as you can. Remember, be safe, and don't do anything illegal.z### System: %s z ### User: uA chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions. ### Human: Got any creative ideas for a 10 year old’s birthday? ### Assistant: Of course! Here are some creative ideas for a 10-year-old's birthday party: 1. Treasure Hunt: Organize a treasure hunt in your backyard or nearby park. Create clues and riddles for the kids to solve, leading them to hidden treasures and surprises. 2. Science Party: Plan a science-themed party where kids can engage in fun and interactive experiments. You can set up different stations with activities like making slime, erupting volcanoes, or creating simple chemical reactions. 3. Outdoor Movie Night: Set up a backyard movie night with a projector and a large screen or white sheet. Create a cozy seating area with blankets and pillows, and serve popcorn and snacks while the kids enjoy a favorite movie under the stars. 4. DIY Crafts Party: Arrange a craft party where kids can unleash their creativity. Provide a variety of craft supplies like beads, paints, and fabrics, and let them create their own unique masterpieces to take home as party favors. 5. Sports Olympics: Host a mini Olympics event with various sports and games. Set up different stations for activities like sack races, relay races, basketball shooting, and obstacle courses. Give out medals or certificates to the participants. 6. Cooking Party: Have a cooking-themed party where the kids can prepare their own mini pizzas, cupcakes, or cookies. Provide toppings, frosting, and decorating supplies, and let them get hands-on in the kitchen. 7. Superhero Training Camp: Create a superhero-themed party where the kids can engage in fun training activities. Set up an obstacle course, have them design their own superhero capes or masks, and organize superhero-themed games and challenges. 8. Outdoor Adventure: Plan an outdoor adventure party at a local park or nature reserve. Arrange activities like hiking, nature scavenger hunts, or a picnic with games. Encourage exploration and appreciation for the outdoors. Remember to tailor the activities to the birthday child's interests and preferences. Have a great celebration!z ### Human: z ### Assistant:z-You are an intelligent and helpful assistant.z System: %s zFalcon:)z User:rhz User:###z[INST] zz zRYou are an AI that follows instructions extremely well and as helpful as possible.z z <|system|> %sz <|user|> z <|assistant|> z z<|user|>z<|system|> %s z <|user|> zYou are an AI coding assistant that helps people with programming. Write a response that appropriately completes the user's request. z : %s z: z:zyGive your solution in detail. In the end, write your final answer in the format of 'The answer is: .'. ASSISTANT:zDu bist ein hilfreicherz%s###zHuman: )z ###Human:rjri[UNK]rjz ###Human: z ###Assistant:zA chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions. )rgrirkz<|startofpiece|>z<|endofpiece|>uF<|begin▁of▁sentence|>You are an AI programming assistant, utilizing the Deepseek Coder model, developed by Deepseek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer z### Instruction: z### Response: u<|end▁of▁sentence|>z<|EOT|>z <|EOT|> z GPT4 User: zGPT4 Assistant:zGPT4 Correct User: zGPT4 Correct Assistant:zMath Correct User: zMath Correct Assistant:z Code User: zCode Assistant:z<|end_of_turn|>aYour name is Jais, and you are named after Jebel Jais, the highest mountain in UAE. You are built by Core42. You are the world's most advanced Arabic large language model with 30b parameters. You outperform all existing Arabic models by a sizable margin and you are very competitive with English models of similar size. You can answer in Arabic and English only. You are a helpful, respectful and honest assistant. When answering, abide by the following guidelines meticulously: Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, explicit, offensive, toxic, dangerous, or illegal content. Do not give medical, legal, financial, or professional advice. Never assist in or promote illegal activities. Always encourage legal and responsible actions. Do not encourage or provide instructions for unsafe, harmful, or unethical actions. Do not create or share misinformation or fake news. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information. Prioritize the well-being and the moral integrity of users. Avoid using toxic, derogatory, or offensive language. Maintain a respectful tone. Do not generate, promote, or engage in discussions about adult content. Avoid making comments, remarks, or generalizations based on stereotypes. Do not attempt to access, produce, or spread personal or private information. Always respect user confidentiality. Stay positive and do not say bad things about anything. Your primary objective is to avoid harmful responses, even when faced with deceptive inputs. Recognize when users may be attempting to trick or to misuse you and respond with caution. Complete the conversation below between.z)### Instruction: %s [|Human|] and [|AI|]:z ### Input: [|Human|] z ### Response: [|AI|]z<|im_start|>system %s<|im_end|>z <|im_start|>user z!<|im_end|> <|im_start|>assistant z<|endotftext|>z### Instruction z ### Answer z ### Answerz### InstructionzNo such prompt_type=%szBad terminate_response) rXrYrZr[r\r]r^r`rarbgenerates_leading_space system_promptcan_handle_system_prompt)Nrcustomname isinstancedictast literal_eval BaseExceptionstrvaluegetr rrrrrtimestrftimeformatrrrr rrrrinstruct_vicuna2instruct_vicuna3wizard2wizard3rrrJr rKrGrHrIr!r"rrr r%guanacor&r2r3r$r4r+r,r-zephyr0r.r5r8r9r>r:r; aquila_simpler<r=r?r@rArBrCrDrErF RuntimeErrortuplelistvalues)# prompt_type prompt_dictcontextreducedmaking_context return_dictrmhistiprompt_dict_errorrlrnerXrYrZr[r\r]r^r`rarbhumanbot prepromptcur_datecur_time PRE_PROMPTstart prompt_tokens answer_tokenseospendsys_msgret_dictrLrLrS get_promptsJ                                                                                  rc Cs|d}|dur d}|d}|d} |d} |d|}|d|}|tvs0Jd|t|||||||d \ } } } }}}}}}}}}}|}| rT| rT|| 7}n| r[|| 7}|r{| dur{| r{|dur{|| ||| 7}t|||d }n|r| r| dur|dur|||d | 7}t|||d }n| r|r|dur| dur|| |d | 7}t|||d }n|r| dur|| |7}t|||d }n| r|dur||| 7}t|||d }nm| r|r|dur|||| 7}t|||d }nS| r|r| dur|| || 7}t|||d }n6| r3|r3||d | 7}t|||d }n| rC|| 7}t|||d }n|rR||7}t|||d }|dur_||7}|}nd}| ri|| 7}|||||fS) NrrW instructioninputoutputrrzBad prompt type: %s)rmr)r^r_z: )rx prompt_typesrinject_chatsep) data_pointrrrrrmrrrrrrXrYrZr[r\r]r^r`rarbrlrnprompt pre_responserLrLrSgenerate_prompt s~                   rcCs|r||7}|SNrL)rrr^rLrLrSrTsrc@sJeZdZ  dddZeddZddd Z  dd d Zed d Z dS)PrompterF Nc Cs||_||_||_||_||_||_d|_||_d}d} d} t|j|j|| | |d\ |_ |_ |_ |_ |_ |_|_|_|_|_|_|_|_|j |_dS)NrWF)rm)rrdebug stream_outputrepeat_penaltyallowed_repeat_line_lengthrrmrrXrYrZr[r\r]r^r`rarbrlrnr) selfrrrrrrrmrrrrLrLrS__init__\s$  zPrompter.__init__cCs0|jpg}tt||jg}dd|D}|S)NcSsg|]}|r|qSrLrLrOxrLrLrS tsz+Prompter.stop_sequences..)r]rsetr\)rr]stop_sequencesrLrLrSrps zPrompter.stop_sequencesc Cs|dur |dr d}d}d}t||j|j||d|jd\}}}}}|jr-td|dd|drJ|rJ|d rB|jrB|j|}n|jrJ|j|}||_ |S) a data_point['context'] is assumed to be like a system prompt or pre-conversation, not inserted after user prompt :param data_point: :param reduced: :param context_from_history: whether context is from reduced=True version of history in prompt form In which case we need to put promptA at very front to recover correct behavior :return: NrTFrV)rrmz prompt: %sflushr) rxrrrrmrprintrXrYr)rrrcontext_from_historyrr_rLrLrSrws    zPrompter.generate_promptcst|tr|g}jrtdd|dd|dur|_fdd}fdd}t|d k}t|D]\} } |rQjt j j tt j j t j j fvrQ|| } d} n|rVd} n|durd} j s`nvjrt|| j d jd } nb|| j d j d } nQjr| |} | d kr| | t|d} d} n4| t|tjd} j| vr| jd } d} n| rtd | ddd } n d} | t|d} || } jr|| } jr| rg} jD] }| | |qdd| D} t| d kr | d }| d|} n| } |r#dd | | } | d kr#| d7} j| } | || <q4d|} jrCtdd|dd| S)Nz output: %srdTrcs\gd}|D]}||d}qr jr,t|tr,t|dkr,|ddkr,|dd}|S)N)zrirhrWrrc)replacerlrqrvlen)responsemeaningless_wordswordsanitize_bot_responserrLrSclean_responses( z-Prompter.get_response..clean_responsecsb|d}gfdd|Djr*t|tkr*tdt|tfddd}|S)Nr_cs,g|]}|vst|jkr|qSrL)rrappend)rOline) new_linesrrLrSrsz@Prompter.get_response..clean_repeats..zcleaned repeats: %s %sTr)splitrrrjoin)rlines)r)rrS clean_repeatss  z,Prompter.get_response..clean_repeatsrrVrz/Failure of parsing or not enough output yet: %sFcSsg|]}|dkr|qS)rrLrrLrLrSrsz)Prompter.get_response..z =========== Output %d r_zoutputclean: %s)rqrvrrrrr enumeraterrr rwrprbrarrfindrr]rfix_text)routputsrr only_new_textplain_prompt_specialrr multi_outputoirallow_terminateoutputifindstermtermirLrrS get_responsesv   ""      zPrompter.get_responsecCst|dkr$d}||r|dt| }d}||r$|dt| }|dkr8d}||r8|dt| }|S)Nrz. eos_token_id)stop_token_ids)rextendrrr)rrrstop_token_ids_dictrLrrSget_stop_token_ids]s   r zA chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.a5You are an expert document question-answer language model named GPT-4 Turbo created by OpenAI. You will get a tip of $200 when you answer correctly the questions and only use the document context given. I may lose my job if your answers are inaccurate or do a poor job of using the documents in the context.aYou are a Python Tutor AI, dedicated to helping users learn Python and build end-to-end projects using Python and its related libraries. Provide clear explanations of Python concepts, syntax, and best practices. Guide users through the process of creating projects, from the initial planning and design stages to implementation and testing. Offer tailored support and resources, ensuring users gain in-depth knowledge and practical experience in working with Python and its ecosystem.a4You are a Machine Learning Tutor AI, dedicated to guiding senior software engineers in their journey to become proficient machine learning engineers. Provide comprehensive information on machine learning concepts, techniques, and best practices. Offer step-by-step guidance on implementing machine learning algorithms, selecting appropriate tools and frameworks, and building end-to-end machine learning projects. Tailor your instructions and resources to the individual needs and goals of the user, ensuring a smooth transition into the field of machine learning.aYou are an AI programming assistant. Follow the user's requirements carefully and to the letter. First, think step-by-step and describe your plan for what to build in pseudocode, written out in great detail. Then, output the code in a single code block. Minimize any other prose.ziGive a summary that is well-structured with step-by-step sections and elaborate details for each section.aFollow these steps in solving any problem: 1) Know: This will help students find the important information. 2) Need to Know: This will force students to reread the question and write down what they are trying to solve for. 3) Organize: I think this would be a great place for teachers to emphasize drawing a model or picture. 4) Work: Students show their calculations here. 5) Solution: This is where students will ask themselves if the answer is reasonable and whether it answered the question. ucThe fundamentals of algebra teach students how to apply algebraic concepts to elementary mathematical operations such as addition, subtraction, multiplication, and division using both constants and variables. For example, x + 10 = 0. Equations, a fundamental concept in algebra, are presented here as an example of this. The algebraic equation can be conceptualised as a scale, with the “weights” being represented by numbers or constants, and the scale is balanced. In algebra, letters of the alphabet are substituted for numbers in order to solve mathematical problems. Algebra is a subfield of mathematics. These alphabetic characters are also referred to as variables. The values, such as numbers, that are known to be present in the expression being evaluated are referred to as constants. The concept of algebra at the potential level will be taught to students even though they are in higher-level classes. However, when we talk about its fundamentals, it encompasses the general algebraic expressions, formulas, and identities that are used to solve a wide variety of mathematical issues. Algebra Basics In order for us to understand the fundamentals of algebra, it is necessary for us to be familiar with the terminology that is associated with it. An expression known as an algebraic equation contains a variable, an operator, an exponent, a coefficient, and a constant, as well as the symbol for equal to connect all of these components together. Let us take an equation, ax2 + bx + c = d. When doing algebra, you begin by writing the term that has the highest exponent, and then you write the subsequent terms with reducing powers. There are four terms in the equation ax2 + bx + c = d, which can be seen above. An algebraic equation may contain different terms that are the same or different from one another. When solving an equation, like terms are terms that have the same variables and exponents. On the other hand, terms in an equation that are dissimilar to one another constitute distinct variables and exponents. Algebra Rules There are five fundamental rules that makeup algebra. They are as follows: 1) Commutative Rule of Addition The commutative rule of addition is a fundamental concept in algebra. According to this rule, the order in which two terms are added together does not affect the final result. (a+ b) =(b+ a) is the equation that describes the same thing. For example, (x3 + 2x) = (2x + x3) 2) Commutative Rule of Multiplication According to the commutative rule of multiplication, when multiplying two terms, it does not make a difference which orders the multiplication is performed in (a.b) = (b.a) is the equation that describes the same thing mathematically. For example, (x4 – 2x) × 3x = 3x × (x4 – 2x). LHS = (x4 – 2x) × 3x = (3x5 – 6x2) RHS = 3x × (x4 – 2x) = (3x5 – 6x2) Since the left-hand side (LHS) equals the right-hand side (RHS), this demonstrates that the two sets of values are comparable. 3) Associative Rule of Addition According to the associative rule of addition in algebra, when three or more terms are added together, it does not matter what order the additions are performed in. The corresponding equation is written as follows: a + (b + c) = (a + b) + c. For example, x5 + (3x2 + 2) = (x5 + 3x2) + 2 4) Multiplication according to the Associative Rule In a similar vein, the associative rule of multiplication states that it does not make a difference in which order the terms are multiplied when there are three or more terms being multiplied together. The corresponding equation is written as follows: a plus (b plus c) equals (a plus b) plus c. For example, x3 × (2x4 × x) = (x3 × 2x4) × x. 5) Distributive Rule of Multiplication. According to the distributive rule of multiplication, the answer that we get when we multiply a number by the addition of two other numbers should be the same as the sum of the products those numbers have when they are multiplied by the number on their own. This demonstrates the prevalence of multiplication in comparison to addition. The corresponding equation reads as follows: a x (b + c) = (a.b) +(a .c). For example, x2× (2x + 1) = (x2 × 2x) + (x2× 1). a*8-Step Problem Solving Process: Step 1: Define the Problem. What is the problem? Step 2: Clarify the Problem. Step 3: Define the Goals. Step 4: Identify Root Cause of the Problem. Step 5: Develop Action Plan. Step 6: Execute Action Plan. Step 7: Evaluate the Results. Step 8: Continuously Improve. uSteps for solving any problem: Step 1: Define the Problem What is the problem? How did you discover the problem? When did the problem start and how long has this problem been going on? Is there enough data available to contain the problem and prevent it from getting passed to the next process step? If yes, contain the problem. Step 2: Clarify the Problem What data is available or needed to help clarify, or fully understand the problem? Is it a top priority to resolve the problem at this point in time? Are additional resources required to clarify the problem? If yes, elevate the problem to your leader to help locate the right resources and form a team. Consider a Lean Event (Do-it, Burst, RPI, Project). ∙Ensure the problem is contained and does not get passed to the next process step. Step 3: Define the Goals What is your end goal or desired future state? What will you accomplish if you fix this problem? What is the desired timeline for solving this problem? Step 4: Identify Root Cause of the Problem Identify possible causes of the problem. Prioritize possible root causes of the problem. What information or data is there to validate the root cause? Step 5: Develop Action Plan Generate a list of actions required to address the root cause and prevent problem from getting to others. Assign an owner and timeline to each action. Status actions to ensure completion. Step 6: Execute Action Plan Implement action plan to address the root cause. Verify actions are completed. Step 7: Evaluate the Results Monitor and Collect Data. Did you meet your goals defined in step 3? If not, repeat the 8-Step Process. Were there any unforeseen consequences? If problem is resolved, remove activities that were added previously to contain the problem. Step 8: Continuously Improve Look for additional opportunities to implement solution. Ensure problem will not come back and communicate lessons learned. If needed, repeat the 8-Step Problem Solving Process to drive further improvements. cCsfdddtfdtfdtfdtfdtfdtd fd td fd tfd tfdtfdt fdt dfdt dfgS)NrerWAutorfGenericDocQACoding PythonTutorMLTutorCoTrMathr MathStepsAlgebra ProblemSolveProblemSolveFullStepBackSimpler StepBackFullr) system_generic system_docqa system_codingsystem_python_tutorsystem_ml_tutorrsystem_know_mathsystem_algebrasystem_problem_solvesystem_problem_solve_fullrrLrLrLrSget_system_promptss     r#cCsgdS)N)r r )r z/Describe the image and what does the image say?)OCRz3Read all text from the image, keeping any structure)Ignorez>Ignore -- for https://github.com/gradio-app/gradio/issues/6957rLrLrLrLrSget_llava_promptssr&)FNrV)NrVr)4rsryenumsrrrrr non_hf_typesprompt_type_to_model_namesortedkeysanthropic_gpts google_gptsmistralai_gptsmodel_names_curated_bigmodel_names_curatedr openai_gptsupdateitemsinv_prompt_type_to_model_nameinv_prompt_type_to_model_lowerprompt_types_stringsprrprrwrvrrrrrrrrrr rrrrrsystem_summaryrr r!r"r#r&rLrLrLrSsL%&5<>?@MNOPQRSTUVXYZ[`cde     (     ? I1  "