MCPcopy Create free account
hub / github.com/InternLM/Tutorial / GenerationConfig

Class GenerationConfig

tools/xtuner_streamlit_demo.py:21–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20@dataclass
21class GenerationConfig:
22 # this config is used for chat to provide more diversity
23 max_length: int = 2048
24 top_p: float = 0.75
25 temperature: float = 0.1
26 do_sample: bool = True
27 repetition_penalty: float = 1.000
28
29
30@torch.inference_mode()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected