chatgpt初次微调记录
上传数据
结果:
File ID: file-BMRVHZvDMcQWWXL3gKPOF2yu
创建微调模型
结果:
response: {
status: 200,
statusText: 'OK',
headers: {
date: 'Wed, 29 Mar 2023 15:38:14 GMT',
'content-type': 'application/json',
'content-length': '911',
connection: 'close',
'openai-version': '2020-10-01',
'openai-organization': 'user-qi7tfkyzt5p63tmvrxibs6cx',
'x-request-id': '5a13c29da1ee04f7f308f6ca7defa313',
'openai-processing-ms': '93',
'access-control-allow-origin': '*',
'strict-transport-security': 'max-age=15724800; includeSubDomains'
},
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [Function: httpAdapter],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus],
headers: {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json',
'User-Agent': 'OpenAI/NodeJS/3.2.1',
Authorization: 'Bearer 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',
'Content-Length': 67
},
method: 'post',
data: '{"training_file":"file-BMRVHZvDMcQWWXL3gKPOF2yu","model":"davinci"}',
url: 'https://api.openai.com/v1/fine-tunes'
},
request: ClientRequest {
_events: [Object: null prototype] {
socket: [Function],
abort: [Function],
aborted: [Function],
connect: [Function],
error: [Function],
timeout: [Function],
prefinish: [Function: requestOnPrefinish]
},
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'api.openai.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.openai.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(asyncId)]: 11,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
connection: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
secureConnecting: false,
_SNICallback: null,
servername: 'api.openai.com',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.openai.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular],
[Symbol(res)]: [TLSWrap],
[Symbol(verified)]: true,
[Symbol(pendingSession)]: null,
[Symbol(asyncId)]: 11,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(kSetNoDelay)]: false,
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
_header: 'POST /v1/fine-tunes HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: application/json\r\n' +
'User-Agent: OpenAI/NodeJS/3.2.1\r\n' +
'Authorization: Bearer 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\r\n' +
'Content-Length: 67\r\n' +
'Host: api.openai.com\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: noopPendingOutput],
agent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object],
requests: {},
sockets: [Object],
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
maxTotalSockets: Infinity,
totalSocketCount: 1,
scheduling: 'fifo',
maxCachedSessions: 100,
_sessionCache: [Object],
[Symbol(kCapture)]: false
},
socketPath: undefined,
method: 'POST',
insecureHTTPParser: undefined,
path: '/v1/fine-tunes',
_ended: true,
res: IncomingMessage {
_readableState: [ReadableState],
readable: false,
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
socket: [TLSSocket],
connection: [TLSSocket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 200,
statusMessage: 'OK',
client: [TLSSocket],
_consuming: true,
_dumped: false,
req: [Circular],
responseUrl: 'https://api.openai.com/v1/fine-tunes',
redirects: [],
[Symbol(kCapture)]: false
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'api.openai.com',
protocol: 'https:',
_redirectable: Writable {
_writableState: [WritableState],
writable: true,
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 67,
_requestBodyBuffers: [],
_onNativeResponse: [Function],
_currentRequest: [Circular],
_currentUrl: 'https://api.openai.com/v1/fine-tunes',
[Symbol(kCapture)]: false
},
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [Array],
'content-type': [Array],
'user-agent': [Array],
authorization: [Array],
'content-length': [Array],
host: [Array]
}
},
data: {
object: 'fine-tune',
id: 'ft-sTfmh1EFfKhAIxeMkvwLRedX',
hyperparams: {
n_epochs: 4,
batch_size: null,
prompt_loss_weight: 0.01,
learning_rate_multiplier: null
},
organization_id: 'org-WqwOfAVNxinzjEEwHN9ZY0cK',
model: 'davinci',
training_files: [ [Object] ],
validation_files: [],
result_files: [],
created_at: 1680104294,
updated_at: 1680104294,
status: 'pending',
fine_tuned_model: null,
events: [ [Object] ]
}
}
列出微调模型
结果:
首次list,状态是pending
data: [
{
object: 'fine-tune',
id: 'ft-sTfmh1EFfKhAIxeMkvwLRedX',
hyperparams: {
n_epochs: 4,
batch_size: null,
prompt_loss_weight: 0.01,
learning_rate_multiplier: null
},
organization_id: 'org-WqwOfAVNxinzjEEwHN9ZY0cK',
model: 'davinci',
training_files: [ [Object] ],
validation_files: [],
result_files: [],
created_at: 1680104294,
updated_at: 1680104294,
status: 'pending',
fine_tuned_model: null
}
]
等了差不多两小时(从2023 23:38:14到2023 01:17:08),才得出成功结果:
data: [
{
object: 'fine-tune',
id: 'ft-sTfmh1EFfKhAIxeMkvwLRedX',
hyperparams: {
n_epochs: 4,
batch_size: 1,
prompt_loss_weight: 0.01,
learning_rate_multiplier: 0.1
},
organization_id: 'org-WqwOfAVNxinzjEEwHN9ZY0cK',
model: 'davinci',
training_files: [ [Object] ],
validation_files: [],
result_files: [ [Object] ],
created_at: 1680104294,
updated_at: 1680110228,
status: 'succeeded',
fine_tuned_model: 'davinci:ft-personal-2023-03-29-17-17-06'
}
]