원샷 러닝으로 전이 학습하기
전이 학습에는 여러 접근 방식이 있으며, 그중 하나가 원샷 러닝으로, 모델이 본 한 가지 예시로 학습하는 방법입니다.
모델을 위한 원샷 러닝 예시를 설정해 보세요.
이 연습은 강의의 일부입니다
Python으로 배우는 LLM 입문
연습 안내
- 샘플 리뷰가
Positive임을 보여서 원샷 러닝 예시를 완성하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Include an example in the input ext
input_text = """
Text: "The dinner we had was great and the service too."
Classify the sentiment of this sentence as either positive or negative.
Example:
Text: "The food was delicious"
____
Text: "The dinner we had was great and the service too."
Sentiment:
"""
# Apply the example to the model
result = model(____, max_length=100)
print(result[0]["label"])