AjayP13 commited on
Commit
98234bc
·
verified ·
1 Parent(s): b551326

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -90
README.md CHANGED
@@ -8,110 +8,57 @@ tags:
8
  - datadreamer-0.39.0
9
  - synthetic
10
  - text-generation
11
- widget:
12
- - text: >+
13
- <|start_header_id|>system<|end_header_id|>
14
-
15
-
16
- Cutting Knowledge Date: December 2023
17
-
18
- Today Date: 31 Jan 2025
19
-
20
-
21
- <|eot_id|><|start_header_id|>user<|end_header_id|>
22
-
23
-
24
- What volleyball exercises should I do I'm almost in high school and i do
25
- volleyball excellence five times a week (basically an advanced class in
26
- school with experienced volleyball coaches) , we have 2-3 skill training
27
- sessions a week which i feel like isn't enough for me as I would like to
28
- improve my skills almost every day.
29
-
30
-
31
- &amp;#x200B;
32
-
33
-
34
- What i wanted to know was what setting, digging, serving and spiking
35
- exercises could i do that would help me improve all of my skills (I have a
36
- large area to practice all these things so space isn't an
37
- issue).<|eot_id|><|start_header_id|>assistant<|end_header_id|>
38
-
39
- example_title: Example 1
40
- - text: >+
41
- <|start_header_id|>system<|end_header_id|>
42
-
43
-
44
- Cutting Knowledge Date: December 2023
45
-
46
- Today Date: 31 Jan 2025
47
-
48
-
49
- <|eot_id|><|start_header_id|>user<|end_header_id|>
50
-
51
-
52
- ![enter image description here](https://i.stack.imgur.com/4ckzp.png)
53
-
54
-
55
- Hi i am trying to make java desktop application where i am using `JLabel` I
56
- wrote some test on `JLabel` I want to set text from the top and I am using
57
- multiple line in `JLabel` I want to set different different color for every
58
- line.
59
-
60
-
61
- Here is my code:
62
-
63
-
64
- ```
65
-
66
- JLabel label = new JLabel("<html>Case
67
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Item&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
68
- CaseNum<br>Party1<br>Party2</html>");
69
-
70
-
71
- ```
72
-
73
-
74
- How can I achieve
75
- this?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
76
-
77
- example_title: Example 2
78
- - text: >+
79
- <|start_header_id|>system<|end_header_id|>
80
-
81
-
82
- Cutting Knowledge Date: December 2023
83
-
84
- Today Date: 31 Jan 2025
85
-
86
-
87
- <|eot_id|><|start_header_id|>user<|end_header_id|>
88
-
89
-
90
- Is there a cheaper substitute for the knipex pliers? I have wanted a pair of
91
- the knipex crimpers/pliers/cutters for a while, but I can't afford $70 for a
92
- pair. Is there a pair that is as good, but
93
- cheaper?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
94
-
95
- example_title: Example 3
96
- pipeline_tag: text-generation
97
  ---
98
  # Model Card
99
 
100
- [Add more information here](https://huggingface.co/templates/model-card-example)
 
 
101
 
102
  ## Example Usage
103
 
104
- ```python3
105
  from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, Conversation
106
 
 
107
  tokenizer = AutoTokenizer.from_pretrained('fineinstructions/query_templatizer', revision=None) # Load tokenizer
108
  tokenizer.padding_side = 'left'
109
- model = AutoModelForCausalLM.from_pretrained('fineinstructions/query_templatizer_full_end_to_end_s2', revision=None, device_map='auto') # Load model
110
  pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, pad_token_id=tokenizer.pad_token_id, return_full_text=False)
111
 
 
112
  inputs = ["What volleyball exercises should I do I'm almost in high school and i do volleyball excellence five times a week (basically an advanced class in school with experienced volleyball coaches) , we have 2-3 skill training sessions a week which i feel like isn't enough for me as I would like to improve my skills almost every day.\n\n&amp;#x200B;\n\nWhat i wanted to know was what setting, digging, serving and spiking exercises could i do that would help me improve all of my skills (I have a large area to practice all these things so space isn't an issue)."]
113
  prompts = [tokenizer.apply_chat_template([{'role': 'user', 'content': i}], tokenize=False, add_generation_prompt=True) for i in inputs]
114
- print(pipe(prompts, max_length=131072, do_sample=False))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  ```
116
 
117
  ---
 
8
  - datadreamer-0.39.0
9
  - synthetic
10
  - text-generation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ---
12
  # Model Card
13
 
14
+ This model will convert a query / instruction / prompt into a generic, instruction template into the format of [FineTemplates](https://huggingface.co/datasets/fineinstructions/finetemplates).
15
+
16
+ The output will be a JSON object.
17
 
18
  ## Example Usage
19
 
20
+ ```python
21
  from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, Conversation
22
 
23
+ # Load model
24
  tokenizer = AutoTokenizer.from_pretrained('fineinstructions/query_templatizer', revision=None) # Load tokenizer
25
  tokenizer.padding_side = 'left'
26
+ model = AutoModelForCausalLM.from_pretrained('fineinstructions/query_templatizer', revision=None) # Load model
27
  pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, pad_token_id=tokenizer.pad_token_id, return_full_text=False)
28
 
29
+ # Run inference to templatize the query
30
  inputs = ["What volleyball exercises should I do I'm almost in high school and i do volleyball excellence five times a week (basically an advanced class in school with experienced volleyball coaches) , we have 2-3 skill training sessions a week which i feel like isn't enough for me as I would like to improve my skills almost every day.\n\n&amp;#x200B;\n\nWhat i wanted to know was what setting, digging, serving and spiking exercises could i do that would help me improve all of my skills (I have a large area to practice all these things so space isn't an issue)."]
31
  prompts = [tokenizer.apply_chat_template([{'role': 'user', 'content': i}], tokenize=False, add_generation_prompt=True) for i in inputs]
32
+ generations = pipe(prompts, max_length=131072, do_sample=False)
33
+ output = generations[0][0]['generated_text']
34
+ print(output)
35
+
36
+ ##### Output:
37
+ # {
38
+ # ...,
39
+ # "template": "What <fi>name of sport or activity</fi> exercises should I do I'm almost <fi>level of experience or age</fi> and I do <fi>name of sport or activity</fi> <fi>frequency of training sessions</fi> (basically an <fi>level of experience or age</fi> class with experienced <fi>instructors or coaches</fi>), we have <fi>number of training sessions per week</fi> which I feel like isn't enough for me as I would like to improve my skills almost every <fi>unit of time</fi>. What I wanted to know was what <fi>specific skills or techniques</fi> exercises could I do that would help me improve all of my skills (I have a <fi>description of the area for practice</fi> so space isn't an issue).",
40
+ # "compatible_document_description": "A document that provides guidance on a specific sport or activity, including training plans and exercises tailored to different levels of experience or age, would be suitable. The document should contain information on the frequency of training sessions, the role of experienced instructors or coaches, and the importance of regular practice to improve skills. It should also offer specific exercises and techniques for various skills or techniques relevant to the sport or activity, taking into account the individual's current level of experience and the available training space. Additionally, the document should cover the benefits of practicing a particular area of the sport or activity, such as a specific skill or technique, and provide a plan for improving skills at a rate of almost every unit of time. The document could be a training manual, a coaching guide, a blog post, or an article from a reputable source in the field of sports or fitness, and could be written for beginners, intermediate, or advanced practitioners. The document should be detailed enough to provide actionable advice and exercises for improving skills in a specific sport or activity, and should be relevant to the individual's current level of experience and training frequency. Overall, the document should be a comprehensive resource that addresses the needs of individuals seeking to improve their skills in a particular sport or activity.",
41
+ # "qa_or_tasky": "qa",
42
+ # "realistic": true,
43
+ # "conversational": false,
44
+ # "task_type_open": "Provide exercises for improving skills",
45
+ # "task_type_closed": "text_generation",
46
+ # "difficulty": 0.2,
47
+ # "compatibility": 0.05,
48
+ # "query_frequency": 0.01,
49
+ # "is_knowledge_recall": true,
50
+ # "is_reasoning": false,
51
+ # "is_code": false,
52
+ # "is_math": false,
53
+ # "is_science": false,
54
+ # "is_medicine": false,
55
+ # "is_personal_life": true,
56
+ # "is_agenty": false,
57
+ # "is_planning": false,
58
+ # "is_few_shot": false,
59
+ # ...
60
+ # }
61
+ #
62
  ```
63
 
64
  ---