dspy.LM
dspy.LM
이 페이지는 DSPy의 언어 모델 클래스인 LM을 다뤄요. 대부분의 작업에서 쓰는 실제 LM 래퍼로, dspy.LM("openai/gpt-4o-mini")처럼 공급자와 모델 식별자로 생성해요. 호출 실행, 히스토리 기록, fine-tuning, 강화 학습(reinforce) 등 언어 모델과 관련된 다양한 작업을 담당해요.
출처: 문서
본문
LM은 DSPy에서 기본적으로 사용하는 언어 모델 클래스예요. 메시지를 받아 완성을 생성하고(forward/acall), 호출 이력을 기록하며(update_history, inspect_history), 공급자 추론(infer_provider), 미세 조정(finetune), 강화 학습(reinforce)까지 지원해요. 아래는 이 클래스가 노출하는 멤버 목록이에요.
::: dspy.LM
handler: python
options:
members:
- __call__
- acall
- aforward
- copy
- dump_state
- finetune
- forward
- infer_provider
- inspect_history
- kill
- launch
- load_state
- reinforce
- update_history
show_source: true
show_root_heading: true
heading_level: 2
docstring_style: google
show_root_full_path: true
show_object_full_path: false
separate_signature: false
inherited_members: true