MCPcopy
hub / github.com/InternLM/Tutorial / GenerationConfig

Class GenerationConfig

tools/streamlit_demo.py:36–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35@dataclass
36class GenerationConfig:
37 # this config is used for chat to provide more diversity
38 max_length: int = 32768
39 top_p: float = 0.8
40 temperature: float = 0.8
41 do_sample: bool = True
42 repetition_penalty: float = 1.005
43
44
45@torch.inference_mode()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected