파운데이션 모델 정보 조회하기
파운데이션 모델 정보 조회하기
watsonx.ai에 배포된 파운데이션 모델 목록을 API로 받아오고, 필요한 필터를 걸어 쓸모 있는 형태로 줄이는 방법을 다뤄요. 여기서 얻은 모델 ID는 바로 코드에서 모델을 참조할 때 쓰게 돼요.
출처: Getting foundation model information - IBM watsonx.ai 공식 문서
개발 방법
REST API, Python, Node.js로 파운데이션 모델 정보를 조회할 수 있어요. UI를 선호한다면 watsonx.ai의 Resource hub에서도 모델 목록을 보고 필터링할 수 있어요 (Supported foundation models, Supported encoder models 참고).
REST API로 모델 목록 조회
watsonx.ai API의 List the available foundation models 메서드를 쓰면 사용 가능한 파운데이션 모델 정보를 얻을 수 있어요. 반환되는 정보에는 모델 ID가 포함되어 있는데, 그걸로 코드에서 모델을 참조하게 돼요.
IBM이 watsonx.ai에 제공한 모델 — 바로 추론할 수 있는 모델들의 목록이에요.
curl -X GET \
'https://<region>.<cloud-provider-domain>/ml/v1/foundation_model_specs?version=2024-05-01'
모델 ID를 얻은 뒤에는 model_id 파라미터에 그 값을 넣어 API 요청을 보내요.
curl --request POST 'https://<region>.<cloud-provider-domain>/ml/v1/text/generation?version=2023-05-02'
-H 'Authorization: Bearer ***'
-H 'Content-Type: application/json'
-H 'Accept: application/json'
--data-raw '{
"model_id": "ibm/granite-8b-code-instruct",
"input": "Tell me a story",
"project_id": "63dc4cf1-252f-424b-b52d-5cdd9814987f"
}'
커스텀 파운데이션 모델 — 접근 가능한 배포된 커스텀 모델 목록은 이렇게 조회해요. 이 메서드는 베어러 토큰이 필요해요.
curl -X GET \
'https://{region}.ml.cloud.ibm.com/ml/v4/deployments?version=2024-12-12&type=custom_foundation_model'
Deploy on demand 모델 — 직접 배포할 수 있는 IBM 제공 모델 목록은 다음 메서드를 써요.
curl -X GET \
'https://{region}.ml.cloud.ibm.com/ml/v1/foundation_model_specs?version=2024-12-10&filters=curated'
배포형 모델의 모델 ID 찾기
제공된 파운데이션 모델은 IBM foundation models, Third-party foundation models, IBM embedding models, Third-party embedding models, Reranker models 링크에서 모델 ID를 찾을 수 있어요.
⚠️ 중요: Deploy on demand 모델은 모델 ID로 추론하지 않아요. 모델 ID는 배포할 때만 쓰고, 배포가 끝나면 배포의 API 엔드포인트로 추론해요.
Deploy on demand 모델을 API로 배포하려면 REST API의 Create a deployment 메서드를 쓰고, 추론은 Deployments > Infer text 메서드를 사용해요. 아래는 API에서 배포할 때 {model_id} 파라미터에 넣을 값 목록이에요.
| 표시 이름 | model_id |
|---|---|
| granite-4-h-small | ibm/granite-4-h-small-curated |
| granite-4-h-tiny | ibm/granite-4-h-tiny-curated |
| granite-4-h-micro | ibm/granite-4-h-micro-curated |
| granite-vision-3-3-2b | ibm/granite-vision-3-3-2b-curated |
| granite-3-1-8b-base | ibm/granite-3-1-8b-base-curated |
| granite-3-3-8b-instruct | ibm/granite-3-3-2b-instruct-curated |
| granite-3-3-2b-instruct | ibm/granite-3-3-2b-instruct-curated |
| granite-3-2-8b-instruct | ibm/granite-3-2-8b-instruct-curated |
| granite-3-8b-base | ibm/granite-3-8b-base-curated |
| granite-7b-lab | ibm/granite-7b-lab-curated |
| granite-8b-japanese | ibm/granite-8b-japanese-curated |
| granite-20b-multilingual | ibm/granite-20b-multilingual-curated |
| granite-13b-chat-v2 | ibm/granite-13b-chat-v2-curated |
| granite-20b-code-base-schema-linking | ibm/granite-20b-code-base-schema-linking-curated |
| granite-20b-code-base-sql-gen | ibm/granite-20b-code-base-sql-gen-curated |
| allam-1-13b-instruct (Deprecated) | ibm/allam-1-13b-instruct-curated |
| codellama-34b-instruct-hf | meta-llama/codellama-34b-instruct-hf-curated |
| codestral-2501 | mistralai/codestral-2501-curated |
| deepseek-r1-distill-llama-8b | deepseek-ai/deepseek-r1-distill-llama-8b-curated |
| deepseek-r1-distill-llama-70b | deepseek-ai/deepseek-r1-distill-llama-70b-curated |
| eurollm-1-7b-instruct | utter-project/eurollm-1-7b-instruct-curated |
| eurollm-9b-instruct | utter-project/eurollm-9b-instruct-curated |
| gpt-oss-20b | openai/gpt-oss-20b-curated |
| gpt-oss-120b | openai/gpt-oss-120b-curated |
| llama-2-70b-chat | meta-llama/llama-2-70b-chat-curated |
| llama-3-8b-instruct | meta-llama/llama-3-8b-instruct-curated |
| llama-3-70b-instruct | meta-llama/llama-3-70b-instruct-curated |
| llama-3-1-8b | meta-llama/llama-3-1-8b-curated |
| llama-3-1-8b-instruct | meta-llama/llama-3-1-8b-instruct-curated |
| llama-3-1-70b | meta-llama/llama-3-1-70b-curated |
| llama-3-1-70b-gptq | meta-llama/llama-3-1-70b-gptq-curated |
| llama-3-1-405b-instruct-fp8 | meta-llama/llama-3-1-405b-instrcut-fp8-curated |
| llama-3-2-11b-vision-instruct (Deprecated) | meta-llama/llama-3-2-11b-vision-instruct-curated |
| llama-3-2-90b-vision-instruct | meta-llama/llama-3-2-90b-vision-instruct-curated |
| llama-3-3-70b-instruct | meta-llama/llama-3-3-70b-instruct-curated |
| llama-3-3-70b-instruct-hf | meta-llama/llama-3-3-70b-instruct-hf-curated |
| llama-4-maverick-17b-128e-instruct-fp8 | meta-llama/llama-4-maverick-17b-128e-instruct-fp8-curated |
| llama-4-maverick-17b-128e-instruct-int4 | meta-llama/llama-4-maverick-17b-128e-instruct-int4-curated |
| llama-4-scout-17b-16e-instruct-fp8-dynamic | meta-llama/llama-4-scout-17b-16e-instruct-fp8-dynamic-curated |
| mistral-medium-2505 (Deprecated) | mistralai/mistral-medium-2505 |
| mistral-medium-2508 | mistralai/mistral-medium-2508 |
| ministral-3b-instruct-2512 | mistralai/ministral-3b-instruct-2512-curated |
| ministral-8b-instruct-2512 | mistralai/ministral-8b-instruct-2512-curated |
| ministral-8b-instruct-2410 | mistralai/ministral-8b-instruct-2410-curated |
| mixtral-8x7b-base | mistralai/mixtral-8x7b-base-curated |
| mixtral-8x7b-instruct-v01 | mistralai/mixtral-8x7b-instruct-v01-curated |
| mistral-nemo-instruct-2407 | mistralai/mistral-nemo-instruct-2407-curated |
| mt0-xxl-13b | bigscience/mt0-xxl-curated |
| poro-34b-chat | lumiopen/poro-34b-chat-curated |