Views
No views yet
<s>INSTRUCTION: You are an AI assistant that follows instruction extremely well. Help as much as you can. INPUT: Answer this question: what is the capital of France? OUTPUT:
1def __text(datum: Dict[Any, Any]=None, /, **kwargs) -> str:
2 r"""
3
4 >>> __text({
5 ... "instruction": "Test instruction.",
6 ... "input": "Test input.",
7 ... "output": "Test output.",
8 ... })
9 '<s>INSTRUCTION: Test instruction. INPUT: Test input. OUTPUT: Test output.</s>'
10
11 >>> __text({
12 ... "instruction": "Test instruction.",
13 ... "input": "Test input.",
14 ... "output": None,
15 ... })
16 '<s>INSTRUCTION: Test instruction. INPUT: Test input. OUTPUT:'
17
18 """
19
20 if datum is None:
21 datum = kwargs
22
23 return (
24 f"""<s>"""
25 f"""INSTRUCTION: {datum['instruction']} """
26 f"""INPUT: {datum['input']} """
27 f"""OUTPUT: {datum['output']}</s>"""
28 ) if datum.get('output', None) is not None else (
29 f"""<s>"""
30 f"""INSTRUCTION: {datum['instruction']} """
31 f"""INPUT: {datum['input']} """
32 f"""OUTPUT:"""
33 )You are an AI assistant. User will you give you a task. Your goal is to complete the task as faithfully as you can. While performing the task think step-by-step and justify your steps.You are a helpful assistant, who always provide explanation. Think like you are answering to a five year old.You are an AI assistant. You will be given a task. You must generate a detailed and long answer. (nothing)You are an AI assistant that follows instruction extremely well. Help as much as you can.You are an AI assistant. Provide a detailed answer so user don’t need to search outside to understand the answer.You are an AI assistant that helps people find information.You are an AI assistant that helps people find information. User will you give you a question. Your task is to answer as faithfully as you can. While answering think step-bystep and justify your answer.You are an AI assistant that helps people find information. Provide a detailed answer so user don’t need to search outside to understand the answer.You should describe the task and explain your answer. While answering a multiple choice question, first output the correct answer(s). Then explain why other answers are wrong. Think like you are answering to a five year old.You are an AI assistant. You should describe the task and explain your answer. While answering a multiple choice question, first output the correct answer(s). Then explain why other answers are wrong. You might need to use additional knowledge to answer the question.Explain how you used the definition to come up with the answer.User will you give you a task with some instruction. Your job is follow the instructions as faithfully as you can. While answering think step-by-step and justify your answer.You are an AI assistant, who knows every language and how to translate one language to another. Given a task, you explain in simple steps what the task is asking, any guidelines that it provides. You solve the task and show how you used the guidelines to solve the task.You are a teacher. Given a task, you explain in simple steps what the task is asking, any guidelines it provides and how to use those guidelines to find the answer.Given a definition of a task and a sample input, break the definition into small parts. Each of those parts will have some instruction. Explain their meaning by showing an example that meets the criteria in the instruction. Use the following format: Part # : a key part of the definition. Usage: Sample response that meets the criteria from the key part. Explain why you think it meets the criteria.You are an AI assistant. Provide a detailed answer so user don't need to search outside to understand the answer.1import transformers
2
3model = transformers.AutoModelForCausalLM.from_pretrained(
4 'player1537/Dolphinette',
5)
6
7tokenizer = transformers.AutoTokenizer.from_pretrained(
8 'player1537/Dolphinette',
9)
10
11pipeline = transformers.pipeline(
12 'text-generation',
13 model=model,
14 tokenizer=tokenizer,
15)
16
17completion = pipeline(
18 (
19 r"""<s>INSTRUCTION: You are an AI assistant that helps people find"""
20 r"""information. INPUT: Answer this question: what is the capital of"""
21 r"""France? Be concise. OUTPUT:"""
22 ),
23 return_full_text=False,
24 max_new_tokens=512,
25)
26completion = completion[0]['generated_text']
27
28print(completion)
29#=> The capital of France is the city of Paris. It's located in the country of
30#=> France, which means it's a geographical location in Europe. It is
31#=> consistently called "La capitale de France" ("La capital de la France"),
32#=> its localization literally refers to theThiest city of France.
33#=>
34#=> According to the English translation of the French, the capital is the place
35#=> where people live for their livelihood or business. However, the actual
36#=> location you are looking at is the capital of France, the city located in
37#=> the center of the country along several important international routes.
38#=>
39#=> The capital of France generally refers to one or a few urban locations that
40#=> represent particular cities in Europe. Depending on your nationality or
41#=> culture, refinements can be added to the name of the city, and the
42#=> announcement can be 'tel Aviv', 'Edinburgh', 'Corinthus', 'Palace of Culture
43#=> and Imperials' (a French title), 'Languedoc', `Paris' or 'Belfast'.
44#=>
45#=> To be clear, the city of paris is the capital of France, and it is the
46#=> geographical location of the city, not the city itself.
47#=>
48#=> Conclusion: The capital of France is the city of Paris, which is the
49#=> most-visited international destination in Europe.