728x90

openai github에 fine-tuned_classification 예제가 있어서 따라해봄.

https://github.com/openai/openai-cookbook/blob/main/examples/Fine-tuned_classification.ipynb

전처리 과정은 별거아니니 따라하면 되고,

prompt 부분은 anaconda prompt에서 진행함. (jupyter notebook에서 안함.)

다만 버전 이슈로 fine_tunes.create하다가 오류가 날 경우 아래 게시물 참고.

https://ndlessrain.com/entry/openai-api-error-argument-chatcompletionscreateimagesgenerateimageseditimagescreatevariationaudiotranscriptionscreateaudiotranslationscreatefilescreatefilesretrievefilesdeletefileslistmodelslistmodelsretrievemodelsdeletecompletionscreate

fine_tunes.create 하면,

이렇게 끊기는 경우가 발생하는데, 이럴때는 fine-tune 옆의 문자열(id) 갖고,

openai api fine_tunes.follow -i ft-UbN20UAWudbtEAthWUXIoqiM

치면 진행상황을 follow할 수 있다.(실수로 모델 지정 안해줘서 CURIE로 해버림...더비쌈...)

최종적으로 아래와 같이 모델 ID까지 얻은 부분을 확인할 수 있다. (curie:ft-personal-2023-12-06-05-43-51)

이후 jupyter notebook에서 또 예제와 같이 따라하면,

결과를 얻을 수 있다.

728x90

+ Recent posts