生成设置
10 个节点
本页内容 10
生成设置
函数Settings for generating text.
签名
生成设置 -> Generation Settings
最大新词元数: 整数
采样: 真否
温度: 数字
Top-P: 数字
Top-K: 整数
重复惩罚: 数字
种子: 整数
停止于: 文本数组GenerationSettings GenerationSettings(
int maxNewTokens = 256,
bool sample = false,
double temperature = 0.7,
double topP = 0.9,
int topK = 50,
double repetitionPenalty = 1,
int seed = 0,
string[] stopAt)参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 最大新词元数 | 整数 | 256 | The most tokens the reply may have; a token is about three quarters of an English word. |
| 采样 | 真否 | False | Sample among likely words rather than always taking the likeliest; off gives the same reply every run. |
| 温度 | 数字 | 0.7 | When sampling, how adventurous the choice is: below 1 safer, above 1 wilder. |
| Top-P | 数字 | 0.9 | When sampling, choose only among the likeliest words whose chances add up to this. |
| Top-K | 整数 | 50 | When sampling, choose only among this many likeliest words; 0 for no limit. |
| 重复惩罚 | 数字 | 1 | Above 1 discourages repeating what was already said. |
| 种子 | 整数 | 0 | When sampling, the seed that makes a run repeatable; the same seed and settings give the same reply on the same device. |
| 停止于 | 文本数组 | — | Texts that end the reply as soon as they are written, such as a closing tag. |
返回
| 生成设置 | Generation Settings |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成设置
- 所属包
- 机器学习
最大新词元数
函数The most tokens a reply may have.
签名
最大新词元数(Generation Settings: Generation Settings) -> 整数
int MaxNewTokens(GenerationSettings Generation Settings)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Generation Settings | Generation Settings | — |
返回
| 结果 | 整数 |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成设置
- 所属包
- 机器学习
重复惩罚
函数How much repeating is discouraged.
签名
重复惩罚(Generation Settings: Generation Settings) -> 数字
double RepetitionPenalty(GenerationSettings Generation Settings)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Generation Settings | Generation Settings | — |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成设置
- 所属包
- 机器学习
采样
函数Whether words are sampled rather than always the likeliest.
签名
采样(Generation Settings: Generation Settings) -> 真否
bool Sample(GenerationSettings Generation Settings)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Generation Settings | Generation Settings | — |
返回
| 结果 | 真否 |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成设置
- 所属包
- 机器学习
种子
函数The seed sampling starts from.
签名
种子(Generation Settings: Generation Settings) -> 整数
int Seed(GenerationSettings Generation Settings)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Generation Settings | Generation Settings | — |
返回
| 结果 | 整数 |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成设置
- 所属包
- 机器学习
停止于
函数Texts that end the reply.
签名
停止于(Generation Settings: Generation Settings) -> 文本数组
string[] StopAt(GenerationSettings Generation Settings)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Generation Settings | Generation Settings | — |
返回
| 结果 | 文本数组 |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成设置
- 所属包
- 机器学习
温度
函数How adventurous sampling is.
签名
温度(Generation Settings: Generation Settings) -> 数字
double Temperature(GenerationSettings Generation Settings)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Generation Settings | Generation Settings | — |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成设置
- 所属包
- 机器学习
Top-K
函数How many of the likeliest words sampling chooses among.
签名
Top-K(Generation Settings: Generation Settings) -> 整数
int TopK(GenerationSettings Generation Settings)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Generation Settings | Generation Settings | — |
返回
| 结果 | 整数 |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成设置
- 所属包
- 机器学习
Top-P
函数The share of probability sampling chooses within.
签名
Top-P(Generation Settings: Generation Settings) -> 数字
double TopP(GenerationSettings Generation Settings)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Generation Settings | Generation Settings | — |
返回
| 结果 | 数字 |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 生成设置
- 所属包
- 机器学习
转为文本
函数One line, as a preview shows it.
签名
转为文本(Generation Settings: Generation Settings) -> 文本
string ToString(GenerationSettings Generation Settings)
参数
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| Generation Settings | Generation Settings | — |
返回
| 结果 | 文本 |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 事件 例程 状态机状态
- 声明于
- 生成设置
- 所属包
- 机器学习