DehydratedWater42 commited on
Commit
1728550
1 Parent(s): a22e3bc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +534 -190
README.md CHANGED
@@ -1,198 +1,542 @@
1
  ---
2
  library_name: peft
3
  base_model: NousResearch/Llama-2-7b-hf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
-
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
-
12
- ## Model Details
13
-
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
-
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
 
197
  ## Model Card Contact
198
 
 
1
  ---
2
  library_name: peft
3
  base_model: NousResearch/Llama-2-7b-hf
4
+ license: llama2
5
+ datasets:
6
+ - DehydratedWater42/semantic_relations_extraction
7
+ language:
8
+ - en
9
+ inference: false
10
+ tags:
11
+ - math
12
+ - semantic
13
+ - extraction
14
+ - graph
15
+ - relations
16
+ - science
17
+ - synthetic
18
  ---
19
 
20
+ # SeELLama (Semantic Extraction LLama)
21
+ Model based on LLama2-7b fine-tuned with `DehydratedWater42/semantic_relations_extraction` dataset.
22
+
23
+ The purpose of this model is to extract semantic relations from text in structured way.
24
+
25
+
26
+ ### This is just adapter for `NousResearch/Llama-2-7b-hf`
27
+ - **Get SeELLama as Safetensors:** [DehydratedWater42/SeELLama](https://huggingface.co/DehydratedWater42/SeELLama)
28
+ - **Get SeELLama as GGUF:** [DehydratedWater42/SeELLama-GGUF](https://huggingface.co/DehydratedWater42/SeELLama-GGUF)
29
+
30
+ ## How to use it:
31
+ ### Template:
32
+ ```text
33
+ Below is an part of larger text. Your task is to extract information about entities and relations to the JSON format.
34
+ ### Text Part to Extract From:
35
+ <<your_text_for_extraction>>
36
+ ### Extracted Relations:
37
+ {
38
+ "section_description":
39
+ ```
40
+ The `JSON` opening is not necessary but it improves stability. Remember to use double `{{` instead of singular '{' if you are using LangChain prompts with fstring formatting.
41
+
42
+ ## Fine-tuning code/settings
43
+
44
+ ```python
45
+ tokenizer = AutoTokenizer.from_pretrained("NousResearch/Llama-2-7b-hf", trust_remote_code=True)
46
+ tokenizer.pad_token = tokenizer.eos_token
47
+ tokenizer.padding_side = "right"
48
+
49
+ torch.backends.cuda.matmul.allow_tf32 = True
50
+ torch.backends.cudnn.allow_tf32 = True
51
+
52
+ bnb_config = BitsAndBytesConfig(
53
+ load_in_4bit=True,
54
+ bnb_4bit_use_double_quant=True,
55
+ bnb_4bit_quant_type="nf4",
56
+ bnb_4bit_compute_dtype=torch.bfloat16,
57
+ )
58
+
59
+ model = AutoModelForCausalLM.from_pretrained(
60
+ "NousResearch/Llama-2-7b-hf",
61
+ quantization_config=bnb_config,
62
+ use_cache=False,
63
+ use_flash_attention_2=False,
64
+ device_map="auto",
65
+ )
66
+ model.config.pretraining_tp = 1
67
+
68
+ peft_params = LoraConfig(
69
+ lora_alpha=16,
70
+ lora_dropout=0.1,
71
+ r=64,
72
+ bias="none",
73
+ task_type="CAUSAL_LM",
74
+ )
75
+
76
+ training_params = TrainingArguments(
77
+ output_dir="./results",
78
+ num_train_epochs=3,
79
+ per_device_train_batch_size=1,
80
+ gradient_accumulation_steps=1,
81
+ optim="paged_adamw_32bit",
82
+ save_steps=100,
83
+ logging_steps=1,
84
+ learning_rate=2e-4,
85
+ weight_decay=0.001,
86
+ bf16=True,
87
+ fp16=False,
88
+ tf32=True,
89
+ max_grad_norm=0.3,
90
+ max_steps=-1,
91
+ warmup_ratio=0.03,
92
+ group_by_length=True,
93
+ lr_scheduler_type="constant",
94
+ report_to="mlflow",
95
+ run_name="semantic-extraction-llama2-7b"
96
+ )
97
+
98
+ trainer = SFTTrainer(
99
+ model=model,
100
+ train_dataset=formated_dataset,
101
+ peft_config=peft_params,
102
+ dataset_text_field="text",
103
+ max_seq_length=int(1024 * 2.5), # 2560
104
+ tokenizer=tokenizer,
105
+ args=training_params,
106
+ packing=True,
107
+ )
108
+ ```
109
+
110
+ ### Example:
111
+ Extracting information from Minecraft Wiki.
112
+
113
+ #### Initial template
114
+ ```text
115
+ Below is an part of larger text. Your task is to extract information about entities and relations to the JSON format.
116
+ ### Text Part to Extract From:
117
+ Players in Survival, Adventure, or Spectator have access to the 2×2 crafting grid from their inventory screen. Small crafting recipes that are at most 2×2 can be made there. These include wooden planks, sticks, crafting tables, torches and some shapeless recipes. To craft items using a bigger grid to allow more crafting recipes, create a crafting table with 4 wooden planks, place it in the world, and press use while facing it. This brings up an interface with a larger, 3×3 crafting grid, which the player can use to craft any crafting recipe in the game. There is also a recipe book where the player can access all the crafting recipes.
118
+
119
+ Some recipes do not require their ingredients to be arranged in a specific way on the crafting grid. These are commonly known as shapeless recipes. For example, players may craft a fermented spider eye by placing its ingredients anywhere within the grid or like a flint and steel can be crafted in any orientation.
120
+
121
+ On the contrary, many recipes must have their ingredients placed in the correct relative positions on the crafting grid. These are commonly known as shaped recipes. Ingredients in shaped recipes can be ‘moved’ up, down, left, or right. They can also be flipped side-ways. For example, a 3×1 recipe, such as bread, can be made using the top, middle, or bottom row of the 3×3 grid, and a bow may be made with the strings placed on the left instead of on the right.
122
+
123
+ There are recipes that may not be moved or mirrored in this way. These are commonly known as fixed recipes. For example, dyes in banner recipes - only available in Bedrock Edition - must be specifically placed to achieve the desired pattern. Fixed recipes can be added by data packs, add-ons, or mods.
124
+ ### Extracted Relations:
125
+ {
126
+ "section_description":
127
+ ```
128
+
129
+
130
+ #### Result (about game):
131
+ ```text
132
+ Below is an part of larger text. Your task is to extract information about entities and relations to the JSON format.
133
+ ### Text Part to Extract From:
134
+ Players in Survival, Adventure, or Spectator have access to the 2×2 crafting grid from their inventory screen. Small crafting recipes that are at most 2×2 can be made there. These include wooden planks, sticks, crafting tables, torches and some shapeless recipes. To craft items using a bigger grid to allow more crafting recipes, create a crafting table with 4 wooden planks, place it in the world, and press use while facing it. This brings up an interface with a larger, 3×3 crafting grid, which the player can use to craft any crafting recipe in the game. There is also a recipe book where the player can access all the crafting recipes.
135
+
136
+ Some recipes do not require their ingredients to be arranged in a specific way on the crafting grid. These are commonly known as shapeless recipes. For example, players may craft a fermented spider eye by placing its ingredients anywhere within the grid or like a flint and steel can be crafted in any orientation.
137
+
138
+ On the contrary, many recipes must have their ingredients placed in the correct relative positions on the crafting grid. These are commonly known as shaped recipes. Ingredients in shaped recipes can be ‘moved’ up, down, left, or right. They can also be flipped side-ways. For example, a 3×1 recipe, such as bread, can be made using the top, middle, or bottom row of the 3×3 grid, and a bow may be made with the strings placed on the left instead of on the right.
139
+
140
+ There are recipes that may not be moved or mirrored in this way. These are commonly known as fixed recipes. For example, dyes in banner recipes - only available in Bedrock Edition - must be specifically placed to achieve the desired pattern. Fixed recipes can be added by data packs, add-ons, or mods.
141
+ ### Extracted Relations:
142
+ {
143
+ "section_description": "In Minecraft, players can craft items using the 2x2 crafting grid. There are some fixed recipes that require the player to place their ingredients in a specific position.",
144
+ "list_of_entities": [
145
+ "crafting recipes",
146
+ "player",
147
+ "fixed recipes",
148
+ "2x2 crafting grid",
149
+ "survival, adventure, or spectator players",
150
+ "wooden planks",
151
+ "torches",
152
+ "shaped recipes",
153
+ "small crafting recipes",
154
+ "shapeless recipes",
155
+ "wooden planks, sticks, crafting tables, torches",
156
+ "flint and steel"
157
+ ],
158
+ "relations": [
159
+ {
160
+ "description": "Players have access to the 2x2 crafting grid from their inventory screen.",
161
+ "source_entities": [
162
+ "crafting recipes"
163
+ ],
164
+ "target_entities": [
165
+ "player"
166
+ ],
167
+ "strength": "strong"
168
+ },
169
+ {
170
+ "description": "Small crafting recipes that are at most 2x2 can be made using the 2x2 crafting grid.",
171
+ "source_entities": [
172
+ "crafting recipes"
173
+ ],
174
+ "target_entities": [
175
+ "survival, adventure, or spectator players"
176
+ ],
177
+ "strength": "strong"
178
+ },
179
+ {
180
+ "description": "To craft items using a bigger grid to allow more crafting recipes, create a crafting table with 4 wooden planks, place it in the world, and press use while facing it.",
181
+ "source_entities": [
182
+ "crafting recipes"
183
+ ],
184
+ "target_entities": [
185
+ "wooden planks"
186
+ ],
187
+ "strength": "strong"
188
+ },
189
+ {
190
+ "description": "To craft items using a bigger grid to allow more crafting recipes, create a crafting table with 4 wooden planks, place it in the world, and press use while facing it.",
191
+ "source_entities": [
192
+ "crafting recipes"
193
+ ],
194
+ "target_entities": [
195
+ "crafting tables"
196
+ ],
197
+ "strength": "strong"
198
+ },
199
+ {
200
+ "description": "Crafting tables allow players to make bigger crafting recipes that are not possible with the 2x2 crafting grid.",
201
+ "source_entities": [
202
+ "crafting recipes"
203
+ ],
204
+ "target_entities": [
205
+ "torches",
206
+ "flint and steel",
207
+ "wooden planks"
208
+ ],
209
+ "strength": "strong"
210
+ },
211
+ {
212
+ "description": "Crafting tables are used to craft items using the 2x2 crafting grid.",
213
+ "source_entities": [
214
+ "crafting recipes"
215
+ ],
216
+ "target_entities": [
217
+ "wooden planks, sticks, crafting tables, torches"
218
+ ],
219
+ "strength": "strong"
220
+ },
221
+ {
222
+ "description": "There are some fixed recipes that require the player to place their ingredients in a specific position.",
223
+ "source_entities": [
224
+ "crafting recipes"
225
+ ],
226
+ "target_entities": [
227
+ "fixed recipes"
228
+ ],
229
+ "strength": "strong"
230
+ },
231
+ {
232
+ "description": "The recipes do not require their ingredients to be arranged in a specific way on the crafting grid.",
233
+ "source_entities": [
234
+ "crafting recipes"
235
+ ],
236
+ "target_entities": [
237
+ "shapeless recipes"
238
+ ],
239
+ "strength": "strong"
240
+ },
241
+ {
242
+ "description": "Ingredients in shapeless recipes can be ‘moved’ up, down, left, or right.",
243
+ "source_entities": [
244
+ "crafting recipes"
245
+ ],
246
+ "target_entities": [
247
+ "shaped recipes"
248
+ ],
249
+ "strength": "strong"
250
+ },
251
+ {
252
+ "description": "Ingredients in shaped recipes can be flipped side-ways.",
253
+ "source_entities": [
254
+ "crafting recipes"
255
+ ],
256
+ "target_entities": [
257
+ "fixed recipes"
258
+ ],
259
+ "strength": "strong"
260
+ },
261
+ {
262
+ "description": "There are some fixed recipes that require the player to place their ingredients in a specific position.",
263
+ "source_entities": [
264
+ "crafting recipes"
265
+ ],
266
+ "target_entities": [
267
+ "fixed recipes"
268
+ ],
269
+ "strength": "strong"
270
+ },
271
+ {
272
+ "description": "The recipes can be added by data packs, add-ons, or mods.",
273
+ "source_entities": [
274
+ "crafting recipes"
275
+ ],
276
+ "target_entities": [
277
+ "fixed recipes"
278
+ ],
279
+ "strength": "strong"
280
+ }
281
+ ]
282
+ }
283
+ ```
284
+
285
+ ### Smaller example (About crafting)
286
+ ```text
287
+ Below is an part of larger text. Your task is to extract information about entities and relations to the JSON format.
288
+ ### Text Part to Extract From:
289
+ Players in Survival, Adventure, or Spectator have access to the 2×2 crafting grid from their inventory screen. Small crafting recipes that are at most 2×2 can be made there. These include wooden planks, sticks, crafting tables, torches and some shapeless recipes. To craft items using a bigger grid to allow more crafting recipes, create a crafting table with 4 wooden planks, place it in the world, and press use while facing it. This brings up an interface with a larger, 3×3 crafting grid, which the player can use to craft any crafting recipe in the game. There is also a recipe book where the player can access all the crafting recipes.
290
+ ### Extracted Relations:
291
+ {
292
+ "section_description": "Survival, Adventure, and Spectator players have access to the 2×2 crafting grid. However, to craft items using a bigger grid, you need to create a crafting table with wooden planks, place it in the world, and press use while facing it.",
293
+ "list_of_entities": [
294
+ "Survival",
295
+ "wooden planks",
296
+ "Spectator",
297
+ "Adventure",
298
+ "crafting grid"
299
+ ],
300
+ "relations": [
301
+ {
302
+ "description": "Survival players can access the 2×2 crafting grid.",
303
+ "source_entities": [
304
+ "Survival"
305
+ ],
306
+ "target_entities": [
307
+ "crafting grid"
308
+ ],
309
+ "strength": "strong"
310
+ },
311
+ {
312
+ "description": "Adventure and Spectator players can also access the 2×2 crafting grid.",
313
+ "source_entities": [
314
+ "Adventure"
315
+ ],
316
+ "target_entities": [
317
+ "crafting grid"
318
+ ],
319
+ "strength": "strong"
320
+ },
321
+ {
322
+ "description": "To craft items using a bigger grid, you need to create a crafting table with wooden planks.",
323
+ "source_entities": [
324
+ "Spectator"
325
+ ],
326
+ "target_entities": [
327
+ "crafting grid"
328
+ ],
329
+ "strength": "strong"
330
+ }
331
+ ]
332
+ }
333
+ ```
334
+
335
+ ### Longer example (dirt block)
336
+ ```text
337
+ Below is an part of larger text. Your task is to extract information about entities and relations to the JSON format.
338
+ ### Text Part to Extract From:
339
+ Usage
340
+ Using bone meal on grass blocks causes short grass, tall grass,‌[Java Edition only] ferns,‌[Bedrock Edition only] and flowers to grow.
341
+
342
+ Passive mobs tend to wander toward grass blocks. They also wander toward light.
343
+
344
+ When a sheep eats a grass block, the block becomes dirt, and a sheared sheep regrows its wool. Baby sheep graze grass much more often than adults and mature 1 minute faster when grazing.
345
+
346
+ Tilling a grass block with a hoe converts it to a farmland block.
347
+
348
+ Dirt paths can be created by using any type of shovel on the side or top of a grass block with air above it. The shovel loses 1 durability for each dirt path block created.
349
+
350
+ Death
351
+ Grass dies and changes to dirt a random time (when a random tick lands on the block) after it has been covered by any opaque blocks. Transparent blocks can kill grass in a similar manner if they cause the light level above the grass block to be four or below (like water does), and the surrounding area is not otherwise sufficiently illuminated.
352
+
353
+ Spawning
354
+ In Java Edition, animals occasionally spawn on grass blocks that have light level 9 or brighter in the space directly above. This is quite rare and requires that there be few other animals nearby or in the spawn chunks. Most animals are instead created along with the terrain.
355
+
356
+ In Bedrock Edition, most animals require surface grass blocks (grass blocks with no solid block anywhere above them at the same x, z coordinate) to spawn. Animals regularly spawn in most Overworld biomes on surface grass blocks that have light level 7 or brighter in the space directly above.
357
+
358
+ Snowy grass block
359
+
360
+ A snowy grass block with snow on top of it.
361
+ Grass blocks turn into a snowy grass block if snow, powder snow or a snow block is placed on top of the block. Removing the snow layer turns the block into a normal grass block.
362
+
363
+ Composting
364
+ In Bedrock Edition, placing grass blocks into a composter has a 30% chance of raising the compost level by 1.
365
+
366
+
367
+
368
+ ### Extracted Relations:
369
+ {
370
+ "section_description": "The article discusses the various ways in which grass blocks can be used in Minecraft, including as food, fuel, and protection. It also covers how grass blocks can be used to tame animals, and the dangers of being exposed to grass. The article concludes by highlighting the importance of knowing how to use and defend against grass blocks.",
371
+ "list_of_entities": [
372
+ "dirt",
373
+ "Minecraft",
374
+ "light level",
375
+ "animal",
376
+ "surface grass blocks",
377
+ "Bedrock Edition",
378
+ "Java Edition",
379
+ "dirt path",
380
+ "grass",
381
+ "snow",
382
+ "snowy grass block",
383
+ "opaque blocks",
384
+ "sheep",
385
+ "composter",
386
+ "transparent blocks"
387
+ ],
388
+ "relations": [
389
+ {
390
+ "description": "Grass blocks are a renewable resource that can be used as a food item.",
391
+ "source_entities": [
392
+ "Minecraft",
393
+ "grass"
394
+ ],
395
+ "target_entities": [
396
+ "animal",
397
+ "surface grass blocks"
398
+ ],
399
+ "strength": "strong"
400
+ },
401
+ {
402
+ "description": "Grass blocks can be used to tame animals.",
403
+ "source_entities": [
404
+ "Minecraft",
405
+ "grass"
406
+ ],
407
+ "target_entities": [
408
+ "animal",
409
+ "surface grass blocks"
410
+ ],
411
+ "strength": "strong"
412
+ },
413
+ {
414
+ "description": "Exposure to grass blocks can cause damage to the player's health.",
415
+ "source_entities": [
416
+ "Minecraft"
417
+ ],
418
+ "target_entities": [
419
+ "grass",
420
+ "player"
421
+ ],
422
+ "strength": "strong"
423
+ },
424
+ {
425
+ "description": "Placing grass blocks in a composter has a 30% chance of raising the compost level by 1.",
426
+ "source_entities": [
427
+ "Minecraft",
428
+ "grass"
429
+ ],
430
+ "target_entities": [
431
+ "composter",
432
+ "grass"
433
+ ],
434
+ "strength": "strong"
435
+ },
436
+ {
437
+ "description": "Surface grass blocks are the only ones that can be used to spawn animals.",
438
+ "source_entities": [
439
+ "Minecraft"
440
+ ],
441
+ "target_entities": [
442
+ "surface grass blocks",
443
+ "animal"
444
+ ],
445
+ "strength": "strong"
446
+ },
447
+ {
448
+ "description": "Animals regularly spawn in most Overworld biomes on surface grass blocks that have light level 7 or brighter in the space directly above.",
449
+ "source_entities": [
450
+ "Minecraft"
451
+ ],
452
+ "target_entities": [
453
+ "surface grass blocks",
454
+ "animal"
455
+ ],
456
+ "strength": "strong"
457
+ },
458
+ {
459
+ "description": "If you walk into the grass without first getting rid of any animals or monsters that are there, they will attack you.",
460
+ "source_entities": [
461
+ "Minecraft"
462
+ ],
463
+ "target_entities": [
464
+ "grass",
465
+ "player"
466
+ ],
467
+ "strength": "moderate"
468
+ },
469
+ {
470
+ "description": "Placing grass blocks with snow on top of them turns them into snowy grass blocks.",
471
+ "source_entities": [
472
+ "Minecraft"
473
+ ],
474
+ "target_entities": [
475
+ "snow",
476
+ "grass"
477
+ ],
478
+ "strength": "strong"
479
+ },
480
+ {
481
+ "description": "Removing the snow layer turns the block into a normal grass block.",
482
+ "source_entities": [
483
+ "Minecraft"
484
+ ],
485
+ "target_entities": [
486
+ "snowy grass block",
487
+ "grass"
488
+ ],
489
+ "strength": "strong"
490
+ },
491
+ {
492
+ "description": "Dirt path blocks can be created by using any type of shovel on the side or top of a grass block with air above it.",
493
+ "source_entities": [
494
+ "Minecraft",
495
+ "grass"
496
+ ],
497
+ "target_entities": [
498
+ "dirt path",
499
+ "shovel"
500
+ ],
501
+ "strength": "strong"
502
+ },
503
+ {
504
+ "description": "The shovel loses 1 durability for each dirt path block created.",
505
+ "source_entities": [
506
+ "Minecraft",
507
+ "shovel"
508
+ ],
509
+ "target_entities": [
510
+ "dirt path",
511
+ "shovel"
512
+ ],
513
+ "strength": "moderate"
514
+ },
515
+ {
516
+ "description": "Death grass block dies and changes to dirt a random time (when a random tick lands on the block)",
517
+ "source_entities": [
518
+ "Minecraft"
519
+ ],
520
+ "target_entities": [
521
+ "death grass block",
522
+ "dirt"
523
+ ],
524
+ "strength": "strong"
525
+ },
526
+ {
527
+ "description": "Grass can be used to create dirt paths",
528
+ "source_entities": [
529
+ "Minecraft"
530
+ ],
531
+ "target_entities": [
532
+ "grass",
533
+ "dirt path"
534
+ ],
535
+ "strength": "strong"
536
+ }
537
+ ]
538
+ }
539
+ ```
540
 
541
  ## Model Card Contact
542