-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevolutionaryscale-forge-esmc-api-openapi.yml
More file actions
197 lines (197 loc) · 5.52 KB
/
Copy pathevolutionaryscale-forge-esmc-api-openapi.yml
File metadata and controls
197 lines (197 loc) · 5.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
openapi: 3.1.0
info:
title: EvolutionaryScale Forge ESM Cambrian API
description: >
Hosted inference API for the ESM Cambrian (ESM C) protein representation
learning family. ESM C is a drop-in replacement for ESM2 with comparable
or better accuracy at substantially reduced memory footprint. Provides
encode and logits operations for sequence embedding workflows. Available
in 300M, 600M, and 6B parameter checkpoints.
version: 2024-12-01
contact:
name: EvolutionaryScale Forge
url: https://forge.evolutionaryscale.ai
license:
name: Cambrian Inference Clickthrough License Agreement
url: https://www.evolutionaryscale.ai/policies/cambrian-inference-clickthrough-license-agreement
servers:
- url: https://forge.evolutionaryscale.ai
description: EvolutionaryScale Forge Production
security:
- BearerAuth: []
tags:
- name: Embeddings
description: Sequence-only tokenization and representation extraction.
- name: Sampling
description: Per-residue logits and hidden state retrieval.
paths:
/api/v1/esmc/encode:
post:
summary: Encode Protein Sequence With ESM C
description: >
Tokenize an `ESMProtein` (sequence track only) into an
`ESMProteinTensor` ready for logits / embedding retrieval. ESM C
operates over the sequence track exclusively.
operationId: esmcEncode
tags:
- Embeddings
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ESMCEncodeRequest'
examples:
SimpleEncode:
$ref: '#/components/examples/SimpleEncodeExample'
responses:
'200':
description: Sequence tensor for the supplied protein.
content:
application/json:
schema:
$ref: '#/components/schemas/ESMProteinTensor'
'4XX':
$ref: '#/components/responses/ErrorResponse'
/api/v1/esmc/logits:
post:
summary: Get ESM C Logits And Embeddings
description: >
Returns per-residue sequence logits and (optionally) embeddings or
hidden states for an `ESMProteinTensor` produced by `esmc/encode`.
Use for representation learning, classification heads, mutational
effect prediction, and similar downstream tasks.
operationId: esmcLogits
tags:
- Sampling
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ESMCLogitsRequest'
responses:
'200':
description: Logits and embedding output.
content:
application/json:
schema:
$ref: '#/components/schemas/LogitsOutput'
'4XX':
$ref: '#/components/responses/ErrorResponse'
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: Forge API token issued via forge.evolutionaryscale.ai.
schemas:
ESMProtein:
type: object
properties:
sequence:
type: string
description: Amino acid sequence using one-letter codes.
example: "MKTAYIAKQRQISFVKAHFSRQLEERLGLIEVQ"
ESMProteinTensor:
type: object
properties:
sequence:
type: array
items:
type: integer
LogitsConfig:
type: object
properties:
sequence:
type: boolean
default: true
return_embeddings:
type: boolean
default: false
return_hidden_states:
type: boolean
default: false
ith_hidden_layer:
type: integer
default: -1
LogitsOutput:
type: object
properties:
logits:
type: object
properties:
sequence:
type: array
items:
type: array
items:
type: number
embeddings:
type: array
items:
type: array
items:
type: number
hidden_states:
type: array
items:
type: array
items:
type: array
items:
type: number
ESMCEncodeRequest:
type: object
required:
- model
- protein
properties:
model:
type: string
example: esmc-300m-2024-12
enum:
- esmc-300m-2024-12
- esmc-600m-2024-12
- esmc-6b-2024-12
protein:
$ref: '#/components/schemas/ESMProtein'
ESMCLogitsRequest:
type: object
required:
- model
- protein_tensor
properties:
model:
type: string
example: esmc-300m-2024-12
protein_tensor:
$ref: '#/components/schemas/ESMProteinTensor'
config:
$ref: '#/components/schemas/LogitsConfig'
Error:
type: object
properties:
error:
type: object
properties:
type:
type: string
message:
type: string
code:
type: string
responses:
ErrorResponse:
description: Error returned by the Forge API.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
SimpleEncodeExample:
summary: Encode a short protein sequence
value:
model: esmc-300m-2024-12
protein:
sequence: "AAAAA"