amp-robotics commited on
Commit
c1ebdfc
·
verified ·
1 Parent(s): 3a21da9

AMP Tadpole v0.1.0 (preview)

Browse files
Files changed (11) hide show
  1. LICENSE +408 -0
  2. LICENSE-APACHE-2.0 +201 -0
  3. NOTICE +19 -0
  4. README.md +193 -0
  5. amp-tadpole.onnx +3 -0
  6. config.json +21 -0
  7. instructions.json +0 -0
  8. model.py +135 -0
  9. model.yaml +15 -0
  10. scene.png +0 -0
  11. weights.safetensors +3 -0
LICENSE ADDED
@@ -0,0 +1,408 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Attribution-NonCommercial 4.0 International
2
+
3
+ =======================================================================
4
+
5
+ Creative Commons Corporation ("Creative Commons") is not a law firm and
6
+ does not provide legal services or legal advice. Distribution of
7
+ Creative Commons public licenses does not create a lawyer-client or
8
+ other relationship. Creative Commons makes its licenses and related
9
+ information available on an "as-is" basis. Creative Commons gives no
10
+ warranties regarding its licenses, any material licensed under their
11
+ terms and conditions, or any related information. Creative Commons
12
+ disclaims all liability for damages resulting from their use to the
13
+ fullest extent possible.
14
+
15
+ Using Creative Commons Public Licenses
16
+
17
+ Creative Commons public licenses provide a standard set of terms and
18
+ conditions that creators and other rights holders may use to share
19
+ original works of authorship and other material subject to copyright
20
+ and certain other rights specified in the public license below. The
21
+ following considerations are for informational purposes only, are not
22
+ exhaustive, and do not form part of our licenses.
23
+
24
+ Considerations for licensors: Our public licenses are
25
+ intended for use by those authorized to give the public
26
+ permission to use material in ways otherwise restricted by
27
+ copyright and certain other rights. Our licenses are
28
+ irrevocable. Licensors should read and understand the terms
29
+ and conditions of the license they choose before applying it.
30
+ Licensors should also secure all rights necessary before
31
+ applying our licenses so that the public can reuse the
32
+ material as expected. Licensors should clearly mark any
33
+ material not subject to the license. This includes other CC-
34
+ licensed material, or material used under an exception or
35
+ limitation to copyright. More considerations for licensors:
36
+ wiki.creativecommons.org/Considerations_for_licensors
37
+
38
+ Considerations for the public: By using one of our public
39
+ licenses, a licensor grants the public permission to use the
40
+ licensed material under specified terms and conditions. If
41
+ the licensor's permission is not necessary for any reason--for
42
+ example, because of any applicable exception or limitation to
43
+ copyright--then that use is not regulated by the license. Our
44
+ licenses grant only permissions under copyright and certain
45
+ other rights that a licensor has authority to grant. Use of
46
+ the licensed material may still be restricted for other
47
+ reasons, including because others have copyright or other
48
+ rights in the material. A licensor may make special requests,
49
+ such as asking that all changes be marked or described.
50
+ Although not required by our licenses, you are encouraged to
51
+ respect those requests where reasonable. More considerations
52
+ for the public:
53
+ wiki.creativecommons.org/Considerations_for_licensees
54
+
55
+ =======================================================================
56
+
57
+ Creative Commons Attribution-NonCommercial 4.0 International Public
58
+ License
59
+
60
+ By exercising the Licensed Rights (defined below), You accept and agree
61
+ to be bound by the terms and conditions of this Creative Commons
62
+ Attribution-NonCommercial 4.0 International Public License ("Public
63
+ License"). To the extent this Public License may be interpreted as a
64
+ contract, You are granted the Licensed Rights in consideration of Your
65
+ acceptance of these terms and conditions, and the Licensor grants You
66
+ such rights in consideration of benefits the Licensor receives from
67
+ making the Licensed Material available under these terms and
68
+ conditions.
69
+
70
+
71
+ Section 1 -- Definitions.
72
+
73
+ a. Adapted Material means material subject to Copyright and Similar
74
+ Rights that is derived from or based upon the Licensed Material
75
+ and in which the Licensed Material is translated, altered,
76
+ arranged, transformed, or otherwise modified in a manner requiring
77
+ permission under the Copyright and Similar Rights held by the
78
+ Licensor. For purposes of this Public License, where the Licensed
79
+ Material is a musical work, performance, or sound recording,
80
+ Adapted Material is always produced where the Licensed Material is
81
+ synched in timed relation with a moving image.
82
+
83
+ b. Adapter's License means the license You apply to Your Copyright
84
+ and Similar Rights in Your contributions to Adapted Material in
85
+ accordance with the terms and conditions of this Public License.
86
+
87
+ c. Copyright and Similar Rights means copyright and/or similar rights
88
+ closely related to copyright including, without limitation,
89
+ performance, broadcast, sound recording, and Sui Generis Database
90
+ Rights, without regard to how the rights are labeled or
91
+ categorized. For purposes of this Public License, the rights
92
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
93
+ Rights.
94
+ d. Effective Technological Measures means those measures that, in the
95
+ absence of proper authority, may not be circumvented under laws
96
+ fulfilling obligations under Article 11 of the WIPO Copyright
97
+ Treaty adopted on December 20, 1996, and/or similar international
98
+ agreements.
99
+
100
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
101
+ any other exception or limitation to Copyright and Similar Rights
102
+ that applies to Your use of the Licensed Material.
103
+
104
+ f. Licensed Material means the artistic or literary work, database,
105
+ or other material to which the Licensor applied this Public
106
+ License.
107
+
108
+ g. Licensed Rights means the rights granted to You subject to the
109
+ terms and conditions of this Public License, which are limited to
110
+ all Copyright and Similar Rights that apply to Your use of the
111
+ Licensed Material and that the Licensor has authority to license.
112
+
113
+ h. Licensor means the individual(s) or entity(ies) granting rights
114
+ under this Public License.
115
+
116
+ i. NonCommercial means not primarily intended for or directed towards
117
+ commercial advantage or monetary compensation. For purposes of
118
+ this Public License, the exchange of the Licensed Material for
119
+ other material subject to Copyright and Similar Rights by digital
120
+ file-sharing or similar means is NonCommercial provided there is
121
+ no payment of monetary compensation in connection with the
122
+ exchange.
123
+
124
+ j. Share means to provide material to the public by any means or
125
+ process that requires permission under the Licensed Rights, such
126
+ as reproduction, public display, public performance, distribution,
127
+ dissemination, communication, or importation, and to make material
128
+ available to the public including in ways that members of the
129
+ public may access the material from a place and at a time
130
+ individually chosen by them.
131
+
132
+ k. Sui Generis Database Rights means rights other than copyright
133
+ resulting from Directive 96/9/EC of the European Parliament and of
134
+ the Council of 11 March 1996 on the legal protection of databases,
135
+ as amended and/or succeeded, as well as other essentially
136
+ equivalent rights anywhere in the world.
137
+
138
+ l. You means the individual or entity exercising the Licensed Rights
139
+ under this Public License. Your has a corresponding meaning.
140
+
141
+
142
+ Section 2 -- Scope.
143
+
144
+ a. License grant.
145
+
146
+ 1. Subject to the terms and conditions of this Public License,
147
+ the Licensor hereby grants You a worldwide, royalty-free,
148
+ non-sublicensable, non-exclusive, irrevocable license to
149
+ exercise the Licensed Rights in the Licensed Material to:
150
+
151
+ a. reproduce and Share the Licensed Material, in whole or
152
+ in part, for NonCommercial purposes only; and
153
+
154
+ b. produce, reproduce, and Share Adapted Material for
155
+ NonCommercial purposes only.
156
+
157
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
158
+ Exceptions and Limitations apply to Your use, this Public
159
+ License does not apply, and You do not need to comply with
160
+ its terms and conditions.
161
+
162
+ 3. Term. The term of this Public License is specified in Section
163
+ 6(a).
164
+
165
+ 4. Media and formats; technical modifications allowed. The
166
+ Licensor authorizes You to exercise the Licensed Rights in
167
+ all media and formats whether now known or hereafter created,
168
+ and to make technical modifications necessary to do so. The
169
+ Licensor waives and/or agrees not to assert any right or
170
+ authority to forbid You from making technical modifications
171
+ necessary to exercise the Licensed Rights, including
172
+ technical modifications necessary to circumvent Effective
173
+ Technological Measures. For purposes of this Public License,
174
+ simply making modifications authorized by this Section 2(a)
175
+ (4) never produces Adapted Material.
176
+
177
+ 5. Downstream recipients.
178
+
179
+ a. Offer from the Licensor -- Licensed Material. Every
180
+ recipient of the Licensed Material automatically
181
+ receives an offer from the Licensor to exercise the
182
+ Licensed Rights under the terms and conditions of this
183
+ Public License.
184
+
185
+ b. No downstream restrictions. You may not offer or impose
186
+ any additional or different terms or conditions on, or
187
+ apply any Effective Technological Measures to, the
188
+ Licensed Material if doing so restricts exercise of the
189
+ Licensed Rights by any recipient of the Licensed
190
+ Material.
191
+
192
+ 6. No endorsement. Nothing in this Public License constitutes or
193
+ may be construed as permission to assert or imply that You
194
+ are, or that Your use of the Licensed Material is, connected
195
+ with, or sponsored, endorsed, or granted official status by,
196
+ the Licensor or others designated to receive attribution as
197
+ provided in Section 3(a)(1)(A)(i).
198
+
199
+ b. Other rights.
200
+
201
+ 1. Moral rights, such as the right of integrity, are not
202
+ licensed under this Public License, nor are publicity,
203
+ privacy, and/or other similar personality rights; however, to
204
+ the extent possible, the Licensor waives and/or agrees not to
205
+ assert any such rights held by the Licensor to the limited
206
+ extent necessary to allow You to exercise the Licensed
207
+ Rights, but not otherwise.
208
+
209
+ 2. Patent and trademark rights are not licensed under this
210
+ Public License.
211
+
212
+ 3. To the extent possible, the Licensor waives any right to
213
+ collect royalties from You for the exercise of the Licensed
214
+ Rights, whether directly or through a collecting society
215
+ under any voluntary or waivable statutory or compulsory
216
+ licensing scheme. In all other cases the Licensor expressly
217
+ reserves any right to collect such royalties, including when
218
+ the Licensed Material is used other than for NonCommercial
219
+ purposes.
220
+
221
+
222
+ Section 3 -- License Conditions.
223
+
224
+ Your exercise of the Licensed Rights is expressly made subject to the
225
+ following conditions.
226
+
227
+ a. Attribution.
228
+
229
+ 1. If You Share the Licensed Material (including in modified
230
+ form), You must:
231
+
232
+ a. retain the following if it is supplied by the Licensor
233
+ with the Licensed Material:
234
+
235
+ i. identification of the creator(s) of the Licensed
236
+ Material and any others designated to receive
237
+ attribution, in any reasonable manner requested by
238
+ the Licensor (including by pseudonym if
239
+ designated);
240
+
241
+ ii. a copyright notice;
242
+
243
+ iii. a notice that refers to this Public License;
244
+
245
+ iv. a notice that refers to the disclaimer of
246
+ warranties;
247
+
248
+ v. a URI or hyperlink to the Licensed Material to the
249
+ extent reasonably practicable;
250
+
251
+ b. indicate if You modified the Licensed Material and
252
+ retain an indication of any previous modifications; and
253
+
254
+ c. indicate the Licensed Material is licensed under this
255
+ Public License, and include the text of, or the URI or
256
+ hyperlink to, this Public License.
257
+
258
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
259
+ reasonable manner based on the medium, means, and context in
260
+ which You Share the Licensed Material. For example, it may be
261
+ reasonable to satisfy the conditions by providing a URI or
262
+ hyperlink to a resource that includes the required
263
+ information.
264
+
265
+ 3. If requested by the Licensor, You must remove any of the
266
+ information required by Section 3(a)(1)(A) to the extent
267
+ reasonably practicable.
268
+
269
+ 4. If You Share Adapted Material You produce, the Adapter's
270
+ License You apply must not prevent recipients of the Adapted
271
+ Material from complying with this Public License.
272
+
273
+
274
+ Section 4 -- Sui Generis Database Rights.
275
+
276
+ Where the Licensed Rights include Sui Generis Database Rights that
277
+ apply to Your use of the Licensed Material:
278
+
279
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
280
+ to extract, reuse, reproduce, and Share all or a substantial
281
+ portion of the contents of the database for NonCommercial purposes
282
+ only;
283
+
284
+ b. if You include all or a substantial portion of the database
285
+ contents in a database in which You have Sui Generis Database
286
+ Rights, then the database in which You have Sui Generis Database
287
+ Rights (but not its individual contents) is Adapted Material; and
288
+
289
+ c. You must comply with the conditions in Section 3(a) if You Share
290
+ all or a substantial portion of the contents of the database.
291
+
292
+ For the avoidance of doubt, this Section 4 supplements and does not
293
+ replace Your obligations under this Public License where the Licensed
294
+ Rights include other Copyright and Similar Rights.
295
+
296
+
297
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
298
+
299
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
300
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
301
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
302
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
303
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
304
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
305
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
306
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
307
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
308
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
309
+
310
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
311
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
312
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
313
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
314
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
315
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
316
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
317
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
318
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
319
+
320
+ c. The disclaimer of warranties and limitation of liability provided
321
+ above shall be interpreted in a manner that, to the extent
322
+ possible, most closely approximates an absolute disclaimer and
323
+ waiver of all liability.
324
+
325
+
326
+ Section 6 -- Term and Termination.
327
+
328
+ a. This Public License applies for the term of the Copyright and
329
+ Similar Rights licensed here. However, if You fail to comply with
330
+ this Public License, then Your rights under this Public License
331
+ terminate automatically.
332
+
333
+ b. Where Your right to use the Licensed Material has terminated under
334
+ Section 6(a), it reinstates:
335
+
336
+ 1. automatically as of the date the violation is cured, provided
337
+ it is cured within 30 days of Your discovery of the
338
+ violation; or
339
+
340
+ 2. upon express reinstatement by the Licensor.
341
+
342
+ For the avoidance of doubt, this Section 6(b) does not affect any
343
+ right the Licensor may have to seek remedies for Your violations
344
+ of this Public License.
345
+
346
+ c. For the avoidance of doubt, the Licensor may also offer the
347
+ Licensed Material under separate terms or conditions or stop
348
+ distributing the Licensed Material at any time; however, doing so
349
+ will not terminate this Public License.
350
+
351
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
352
+ License.
353
+
354
+
355
+ Section 7 -- Other Terms and Conditions.
356
+
357
+ a. The Licensor shall not be bound by any additional or different
358
+ terms or conditions communicated by You unless expressly agreed.
359
+
360
+ b. Any arrangements, understandings, or agreements regarding the
361
+ Licensed Material not stated herein are separate from and
362
+ independent of the terms and conditions of this Public License.
363
+
364
+
365
+ Section 8 -- Interpretation.
366
+
367
+ a. For the avoidance of doubt, this Public License does not, and
368
+ shall not be interpreted to, reduce, limit, restrict, or impose
369
+ conditions on any use of the Licensed Material that could lawfully
370
+ be made without permission under this Public License.
371
+
372
+ b. To the extent possible, if any provision of this Public License is
373
+ deemed unenforceable, it shall be automatically reformed to the
374
+ minimum extent necessary to make it enforceable. If the provision
375
+ cannot be reformed, it shall be severed from this Public License
376
+ without affecting the enforceability of the remaining terms and
377
+ conditions.
378
+
379
+ c. No term or condition of this Public License will be waived and no
380
+ failure to comply consented to unless expressly agreed to by the
381
+ Licensor.
382
+
383
+ d. Nothing in this Public License constitutes or may be interpreted
384
+ as a limitation upon, or waiver of, any privileges and immunities
385
+ that apply to the Licensor or You, including from the legal
386
+ processes of any jurisdiction or authority.
387
+
388
+ =======================================================================
389
+
390
+ Creative Commons is not a party to its public
391
+ licenses. Notwithstanding, Creative Commons may elect to apply one of
392
+ its public licenses to material it publishes and in those instances
393
+ will be considered the “Licensor.” The text of the Creative Commons
394
+ public licenses is dedicated to the public domain under the CC0 Public
395
+ Domain Dedication. Except for the limited purpose of indicating that
396
+ material is shared under a Creative Commons public license or as
397
+ otherwise permitted by the Creative Commons policies published at
398
+ creativecommons.org/policies, Creative Commons does not authorize the
399
+ use of the trademark "Creative Commons" or any other trademark or logo
400
+ of Creative Commons without its prior written consent including,
401
+ without limitation, in connection with any unauthorized modifications
402
+ to any of its public licenses or any other arrangements,
403
+ understandings, or agreements concerning use of licensed material. For
404
+ the avoidance of doubt, this paragraph does not form part of the
405
+ public licenses.
406
+
407
+ Creative Commons may be contacted at creativecommons.org.
408
+
LICENSE-APACHE-2.0 ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
NOTICE ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ AMP Tadpole
2
+ Copyright 2026 Adaptive Machine Patterns Ltd
3
+ (registered in England & Wales, no. 15618869)
4
+
5
+ The model weights (weights.safetensors, amp-tadpole.onnx), model.py,
6
+ config.json and model.yaml are licensed under the Creative Commons
7
+ Attribution-NonCommercial 4.0 International licence (see LICENSE).
8
+ Commercial licences are available from Adaptive Machine Patterns Ltd:
9
+ amp@adaptive-machine-patterns.com,
10
+ https://adaptive-machine-patterns.com/amp-embodied-ai-workbench
11
+
12
+ instructions.json lists token ids produced by the tokenizer of
13
+ SmolVLM2-500M-Video-Instruct (HuggingFaceTB), which is licensed under the
14
+ Apache License, Version 2.0 (see LICENSE-APACHE-2.0). The tokenizer itself
15
+ is not included. AMP Tadpole is not otherwise derived from SmolVLM2: its
16
+ weights were trained from scratch.
17
+
18
+ SmolVLM: Redefining small and efficient multimodal models.
19
+ A. Marafioti et al., 2025. arXiv:2504.05299.
README.md ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ library_name: pytorch
4
+ pipeline_tag: robotics
5
+ tags:
6
+ - robotics
7
+ - vision-language-action
8
+ - vla
9
+ - imitation-learning
10
+ - onnx
11
+ - amp-toy-robotics
12
+ ---
13
+
14
+ # AMP Tadpole
15
+
16
+ **A small vision-language-action model that drives a robot arm from three
17
+ camera images and a plain-English instruction.** It has 6.5M parameters
18
+ and runs on a laptop CPU (and, through ONNX, in a web browser).
19
+
20
+ ![A scene from the AMP Toy Robotics Benchmark](scene.png)
21
+
22
+ AMP Tadpole is trained from scratch on the
23
+ [AMP Toy Robotics Benchmark](https://adaptive-machine-patterns.com), and is
24
+ the first model of [Adaptive Machine Patterns](https://adaptive-machine-patterns.com).
25
+
26
+ > **v0.1.0 is a preview.** Training is ongoing; later versions will be
27
+ > published under new tags (see [Versions](#versions)).
28
+
29
+ ## What it does
30
+
31
+ Every 8 steps the model is given:
32
+
33
+ - the **top, side and isometric camera images** (512 × 512 RGB each);
34
+ - the **arm's state**: 6 joint angles and the gripper opening;
35
+ - **one instruction clause**, e.g. *"Pick up the lime star"*.
36
+
37
+ It returns **the next 8 steps** of joint angles and gripper opening. It is
38
+ never told where the objects are: it has to find them in the pictures and
39
+ work out which one the words mean. The benchmark's closed loop executes
40
+ the steps and asks again, until the model asks for no further motion.
41
+
42
+ Instructions: `pick up the X`, `move to the X`,
43
+ `move to the midpoint between X and Y`, `open the gripper`,
44
+ `close the gripper`, `return home`, chained with "then".
45
+
46
+ ## Results
47
+
48
+ On the benchmark's standard 300 held-out scenes (never seen in training,
49
+ and not used to choose the checkpoint), with the model driving the arm
50
+ itself:
51
+
52
+ | clauses | pick | move | midpoint | open | close | home | all | path vs teacher |
53
+ |---|---|---|---|---|---|---|---|---|
54
+ | 898 | 83% | 90% | 63% | 100% | 100% | 99% | **88.2%** | 1.02 |
55
+
56
+ The reference teacher, a scripted controller that knows where everything
57
+ is, scores 99.4% on the same scenes.
58
+
59
+ Grounding tests (100 further held-out scenes; see the benchmark's README):
60
+
61
+ | named object | other objects | image swap | instruction swap | blank instruction |
62
+ |---|---|---|---|---|
63
+ | 0.96 | 0.31 | 1.00 | 1.00 | 0.92 |
64
+
65
+ Told "move to the X", its motion points the way the teacher's does
66
+ (0.96, where 1 is the same direction), and not toward the other objects
67
+ in the scene (0.31). When two objects swap places, or the instruction
68
+ names another object, its motion changes as much as the teacher's does
69
+ (1.00). So it uses both the cameras and the words.
70
+
71
+ **These numbers are a line in the sand, not a ceiling.** v0.1.0 was
72
+ stopped part-way through training, and further training is expected to
73
+ improve them. They are published as a reference point for small models
74
+ on the benchmark: something to beat.
75
+
76
+ These come from `amp-bench eval --policy amp-tadpole` on a CPU (about 45
77
+ minutes). Other hardware can differ in the last digits of the arithmetic,
78
+ so a clause or two may come out differently.
79
+
80
+ ## Use it
81
+
82
+ With the benchmark (`pip install "amp-toy-robotics[packages]"`):
83
+
84
+ ```bash
85
+ hf download Adaptive-Machine-Patterns/amp-tadpole --revision v0.1.0 --local-dir amp-tadpole
86
+ amp-bench eval --policy amp-tadpole
87
+ ```
88
+
89
+ In Python, this repository is a model package:
90
+
91
+ ```python
92
+ import importlib.util
93
+ from safetensors.torch import load_file
94
+
95
+ spec = importlib.util.spec_from_file_location("tadpole", "amp-tadpole/model.py")
96
+ tadpole = importlib.util.module_from_spec(spec); spec.loader.exec_module(tadpole)
97
+ model = tadpole.build()
98
+ model.load_state_dict(load_file("amp-tadpole/weights.safetensors"))
99
+ model.eval()
100
+
101
+ chunk = tadpole.predict(model, images, state, "Pick up the lime star") # (8, 7)
102
+ ```
103
+
104
+ With ONNX Runtime (any language, or the browser): `amp-tadpole.onnx` takes
105
+ `images` uint8 (1, 3, 3, 512, 512), `tokens` int64 (1, 48), `token_mask`
106
+ bool (1, 48) and `state` float32 (1, 7), and returns `chunk` (1, 8, 7).
107
+ `instructions.json` gives the tokens for every canonical clause.
108
+
109
+ ## How it works
110
+
111
+ | part | what it does |
112
+ |---|---|
113
+ | CNN, shared by the cameras | 512 × 512 pixels (plus two pixel-coordinate channels) to a 16 × 16 grid of tokens per camera |
114
+ | word embeddings | the clause's tokens (up to 48) |
115
+ | state token | the 7 numbers, with sines and cosines of the joint angles |
116
+ | 8 action tokens | learned; one per output step |
117
+ | transformer | 6 layers, width 256, 8 heads, over all 825 tokens |
118
+ | head | each action token gives one step's change; the changes are added up |
119
+
120
+ It predicts the 8 steps directly in one pass (no sampling), which suits a
121
+ teacher whose action is a fixed function of the state.
122
+
123
+ ## Training
124
+
125
+ - **Data:** generated on the fly from scene seeds by the benchmark
126
+ (`amp_toy_robotics.data`), labelled by the scripted teacher. No external
127
+ data, no dataset files, no human demonstrations. Scenes from seed
128
+ 9,000,000 up were never used.
129
+ - **Inputs only:** the images, the state and the text, under the
130
+ benchmark's rules. No object positions, no progress reward, no path
131
+ penalty.
132
+ - **Recipe:** 250,000 steps, batch 64, AdamW (peak learning rate 3e-4, 1,000-step warm-up, cosine decay; the run was extended and resumed several times), the
133
+ state hidden from half the samples (so the model must use the cameras),
134
+ and an auxiliary loss in which each image token redraws its patch of
135
+ the image. The redraw head is used only in training and is not included.
136
+ - **The word table** was cut to the 32 tokens the instructions use. This
137
+ changes no output, and takes the model from 19.2M to 6.5M parameters.
138
+
139
+ ## Limitations
140
+
141
+ - It knows only this simulated world: one arm, three fixed cameras, 8
142
+ colours and 5 shapes. It has not seen a real camera.
143
+ - It reads only canonical clauses (`instructions.json`); the benchmark
144
+ rewrites free text into canonical form first.
145
+ - The midpoint instruction is its weakest (see Results).
146
+ - v0.1.0 is a preview, stopped before the end of its planned schedule.
147
+
148
+ ## Versions
149
+
150
+ | version | tag | what changed |
151
+ |---|---|---|
152
+ | 0.1.0 | `v0.1.0` | first preview: step 250,000 |
153
+
154
+ Pin a version with `revision="v0.1.0"` (or `--revision v0.1.0`).
155
+
156
+ ## Licence
157
+
158
+ **Free for non-commercial use** under
159
+ [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) (see
160
+ LICENSE and NOTICE). **For commercial use**, licences are available from
161
+ Adaptive Machine Patterns Ltd:
162
+ [adaptive-machine-patterns.com/amp-embodied-ai-workbench](https://adaptive-machine-patterns.com/amp-embodied-ai-workbench)
163
+ or amp@adaptive-machine-patterns.com.
164
+
165
+ **No warranty.** AMP Tadpole is a research preview, provided "as is",
166
+ without warranty of any kind, and Adaptive Machine Patterns Ltd accepts
167
+ no liability for its use, as set out in sections 5 and 6 of the licence.
168
+ It is not suitable for controlling real machinery, or for any use where
169
+ a wrong movement could cause harm or damage.
170
+
171
+ ## Credits
172
+
173
+ - The token ids in `instructions.json` come from the tokenizer of
174
+ [SmolVLM2-500M-Video-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM2-500M-Video-Instruct)
175
+ (Apache-2.0; Marafioti et al., *SmolVLM: Redefining small and efficient
176
+ multimodal models*, arXiv:2504.05299). The model's weights are AMP's own,
177
+ trained from scratch.
178
+ - Written with the help of AI coding assistants (Anthropic Claude, Qwen, OpenAI ChatGPT).
179
+
180
+ ## Cite
181
+
182
+ ```bibtex
183
+ @misc{amp_tadpole_2026,
184
+ author = {Whyte, Andy and {Adaptive Machine Patterns Ltd}},
185
+ title = {{AMP Tadpole}: a small vision-language-action model},
186
+ year = {2026},
187
+ version = {0.1.0},
188
+ publisher = {Hugging Face},
189
+ url = {https://huggingface.co/Adaptive-Machine-Patterns/amp-tadpole}
190
+ }
191
+ ```
192
+
193
+ © 2026 Adaptive Machine Patterns Ltd, registered in England & Wales, no. 15618869.
amp-tadpole.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04af48ae3dfe4081933f690d2e4a89038bb33c4f62da5a76a57a1dc433117aff
3
+ size 28215128
config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "amp-tadpole",
3
+ "version": "0.1.0",
4
+ "parameters": 6507335,
5
+ "inputs": {
6
+ "images": "uint8 (3, 3, 512, 512): top, side, iso",
7
+ "state": "(7,): 6 joint angles (rad) + gripper (0 open .. 1 closed)",
8
+ "clause": "one canonical instruction clause"
9
+ },
10
+ "output": "(8, 7): the next 8 joint states + gripper",
11
+ "training": {
12
+ "steps": 250000,
13
+ "batch_size": 64,
14
+ "learning_rate": 0.0003,
15
+ "state_dropout": 0.5,
16
+ "seeds": "from 0 (scenes from 9,000,000 up never used)",
17
+ "progress_reward": 0.0,
18
+ "path_weight": 0.0,
19
+ "success_on_100_held_out_scenes_during_training": 0.8629
20
+ }
21
+ }
instructions.json ADDED
The diff for this file is too large to render. See raw diff
 
model.py ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: 2026 Adaptive Machine Patterns Ltd
2
+ # SPDX-License-Identifier: CC-BY-NC-4.0
3
+ """AMP Tadpole: a small vision-language-action model for the AMP Toy
4
+ Robotics Benchmark.
5
+
6
+ in images uint8 (3, 3, 512, 512): the top, side and iso cameras
7
+ state (7,): 6 joint angles (rad) + gripper aperture (0 open, 1 closed)
8
+ clause one instruction clause, in canonical wording
9
+ out (8, 7): the next 8 joint states + gripper aperture
10
+
11
+ images -> a CNN shared by the cameras -> 16 x 16 tokens per camera
12
+ clause -> token ids (instructions.json) -> word embeddings
13
+ state -> one token
14
+ all tokens + 8 learned action tokens -> 6-layer transformer
15
+ each action token -> one step's change; the changes are added up
16
+
17
+ This file is a model package (see the benchmark's README): build() makes
18
+ the module, predict() runs it on one observation. It needs only PyTorch.
19
+ """
20
+
21
+ from __future__ import annotations
22
+
23
+ import json
24
+ import math
25
+ from pathlib import Path
26
+
27
+ import numpy as np
28
+ import torch
29
+ import torch.nn as nn
30
+
31
+ HERE = Path(__file__).resolve().parent
32
+ GRID = 16 # tokens per camera side
33
+ CHUNK = 8 # steps per answer
34
+ STATE_DIM = 7
35
+ TOKEN_LEN = 48 # instruction slots
36
+ STATE_FEATURES = 31
37
+ INC_SCALE = [0.04] * 6 + [0.125] # one step's change, per output unit
38
+ JOINT_LIMITS = [(0.1, 0.8 * math.pi), (math.pi / 2, 3 * math.pi / 2),
39
+ (-0.7 * math.pi, 0.7 * math.pi), (-0.6 * math.pi, 0.6 * math.pi),
40
+ (-math.pi, math.pi), (-math.pi, math.pi)]
41
+
42
+
43
+ class Tadpole(nn.Module):
44
+ def __init__(self, vocab: int, d: int = 256, layers: int = 6, heads: int = 8):
45
+ super().__init__()
46
+
47
+ def block(i, o):
48
+ return nn.Sequential(
49
+ nn.Conv2d(i, o, 3, 2, 1), nn.GroupNorm(8, o), nn.GELU(),
50
+ nn.Conv2d(o, o, 3, 1, 1), nn.GroupNorm(8, o), nn.GELU())
51
+ self.cnn = nn.ModuleList([ # 512 -> 16
52
+ nn.Sequential(nn.Conv2d(5, 48, 7, 4, 3), nn.GroupNorm(8, 48), nn.GELU()),
53
+ block(48, 96), block(96, 192), block(192, d)])
54
+ self.pos = nn.Parameter(torch.zeros(1, GRID * GRID, d))
55
+ self.view = nn.Parameter(torch.zeros(3, 1, d))
56
+ self.word = nn.Embedding(vocab, d)
57
+ self.word_pos = nn.Parameter(torch.zeros(1, TOKEN_LEN, d))
58
+ self.state = nn.Linear(STATE_FEATURES, d)
59
+ self.query = nn.Parameter(torch.zeros(1, CHUNK, d))
60
+ layer = nn.TransformerEncoderLayer(d, heads, 4 * d, dropout=0.0,
61
+ batch_first=True, norm_first=True)
62
+ self.fuse = nn.TransformerEncoder(layer, layers, enable_nested_tensor=False)
63
+ self.head = nn.Sequential(nn.LayerNorm(d), nn.Linear(d, STATE_DIM))
64
+ self.register_buffer("lo", torch.tensor([a for a, _ in JOINT_LIMITS] + [0.0]), persistent=False)
65
+ self.register_buffer("hi", torch.tensor([b for _, b in JOINT_LIMITS] + [1.0]), persistent=False)
66
+ self.register_buffer("inc", torch.tensor(INC_SCALE), persistent=False)
67
+
68
+ def state_features(self, state):
69
+ """The 7 numbers scaled to -1..1, plus sines and cosines of the joint
70
+ angles, so that small differences in pose are not lost."""
71
+ q = state[:, :6]
72
+ return torch.cat([2 * (state - self.lo) / (self.hi - self.lo) - 1,
73
+ torch.sin(2 * q), torch.cos(2 * q),
74
+ torch.sin(8 * q), torch.cos(8 * q)], dim=1)
75
+
76
+ def forward(self, images, tokens, token_mask, state):
77
+ """images uint8 (B, 3, 3, H, W); tokens (B, 48) ids from
78
+ instructions.json; token_mask (B, 48) bool, True for real tokens;
79
+ state (B, 7). Returns (B, 8, 7): the next 8 states."""
80
+ B, H = images.shape[0], images.shape[-1]
81
+ x = images.float() / 255.0
82
+ w = self.word(tokens) + self.word_pos
83
+ ax = torch.linspace(-1, 1, H, device=images.device)
84
+ yy, xx = torch.meshgrid(ax, ax, indexing="ij")
85
+ f = torch.cat([x.flatten(0, 1) * 2 - 1,
86
+ xx.expand(B * 3, 1, H, H), yy.expand(B * 3, 1, H, H)], dim=1)
87
+ for stage in self.cnn:
88
+ f = stage(f)
89
+ f = f.flatten(2).transpose(1, 2) + self.pos
90
+ f = (f.view(B, 3, GRID * GRID, -1) + self.view).flatten(1, 2)
91
+ s = self.state(self.state_features(state))[:, None]
92
+ q = self.query.expand(B, -1, -1)
93
+ h = torch.cat([f, w, s, q], dim=1)
94
+ keep = torch.ones(B, f.shape[1], dtype=torch.bool, device=h.device)
95
+ tail = torch.ones(B, 1 + CHUNK, dtype=torch.bool, device=h.device)
96
+ h = self.fuse(h, src_key_padding_mask=~torch.cat([keep, token_mask, tail], dim=1))
97
+ steps = self.head(h[:, -CHUNK:]) * self.inc
98
+ return steps.cumsum(dim=1) + state[:, None]
99
+
100
+
101
+ _TABLE = None
102
+
103
+
104
+ def instructions() -> dict:
105
+ """The token table: every canonical clause -> its token ids."""
106
+ global _TABLE
107
+ if _TABLE is None:
108
+ _TABLE = json.loads((HERE / "instructions.json").read_text())
109
+ return _TABLE
110
+
111
+
112
+ def encode(clause: str):
113
+ """(ids, mask) for one canonical clause, each of length 48."""
114
+ t = instructions()
115
+ try:
116
+ ids = t["instructions"][clause]
117
+ except KeyError:
118
+ raise ValueError(f"AMP Tadpole only reads canonical clauses "
119
+ f"(e.g. 'Pick up the lime star'); got {clause!r}") from None
120
+ pad = t["pad"]
121
+ return ids + [pad] * (TOKEN_LEN - len(ids)), [True] * len(ids) + [False] * (TOKEN_LEN - len(ids))
122
+
123
+
124
+ def build() -> Tadpole:
125
+ return Tadpole(vocab=len(instructions()["vocab"]))
126
+
127
+
128
+ @torch.no_grad()
129
+ def predict(module: Tadpole, images, state, clause: str) -> np.ndarray:
130
+ dev = next(module.parameters()).device
131
+ ids, mask = encode(clause)
132
+ out = module(torch.as_tensor(np.asarray(images)[None], device=dev),
133
+ torch.tensor([ids], device=dev), torch.tensor([mask], device=dev),
134
+ torch.as_tensor(np.asarray(state, dtype=np.float32)[None], device=dev))
135
+ return out[0].cpu().numpy().astype(np.float64)
model.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AMP Tadpole: a model package for the AMP Toy Robotics Benchmark
2
+ # (and the AMP Embodied AI Workbench). Format: the benchmark's README.
3
+ name: AMP Tadpole
4
+ version: 0.1.0
5
+ author: Andy Whyte, Adaptive Machine Patterns Ltd
6
+ license: CC-BY-NC-4.0 (commercial licences from Adaptive Machine Patterns Ltd)
7
+ homepage: https://huggingface.co/Adaptive-Machine-Patterns/amp-tadpole
8
+ # The model's tokens in order, as (group, count).
9
+ token_map:
10
+ - [top camera, 256]
11
+ - [side camera, 256]
12
+ - [iso camera, 256]
13
+ - [instruction, 48]
14
+ - [state, 1]
15
+ - [action slots, 8]
scene.png ADDED
weights.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:febca96f678fcb83292d07e243f6a8d392ceed74c854a9ea4477e8093bab5e0e
3
+ size 26039652