深度学习
预览Hugging Face 的语言、视觉、语音和图像模型,微调,以及 Keras 网络
18 个类别,共 111 个节点
- 所属发行版
- 元编程(专业版)
- 支持等级
- 第 3 级(拟定)
- 所属包
- 机器学习
机器学习
来自 Hugging Face 模型库的模型:对话与文本生成、嵌入、摘要与翻译、图像与语音识别、Stable Diffusion、LoRA 微调、Keras 网络与 ONNX,以及 YOLO 目标检测。
微调设置
微调设置Settings for a LoRA or QLoRA fine-tune.缩放系数How strongly the adapter applies.批大小Examples per batch.设备Where it trains.随机失活The adapter's dropout.轮数Passes over the data.四位量化Whether the base model is held in 4-bit (QLoRA).梯度累积Batches per step.学习率The learning rate.最大长度The longest example, in tokens.最大步数The step limit; 0 for none.秩The adapter's rank.种子The seed.转为文本One line, as a preview shows it.
生成设置
生成设置Settings for generating text.最大新词元数The most tokens a reply may have.重复惩罚How much repeating is discouraged.采样Whether words are sampled rather than always the likeliest.种子The seed sampling starts from.停止于Texts that end the reply.温度How adventurous sampling is.Top-KHow many of the likeliest words sampling chooses among.Top-PThe share of probability sampling chooses within.转为文本One line, as a preview shows it.
文本任务
回答问题Answers a question with the passage of a text that answers it.文本分类The labels that best describe a text, best first.零样本文本分类Scores a text against labels written in words, best first.填充掩码The likeliest words for the mask token in a text, best first, with the text each makes.加载实体识别器Loads a named-entity recognizer from a Hub repository or a folder.加载掩码填充模型Loads a masked language model from a Hub repository or a folder.加载问答模型Loads an extractive question-answering model from a Hub repository or a folder.加载文本分类器Loads a text classifier from a Hub repository or a folder.加载零样本文本分类器Loads a zero-shot text classifier (a model trained on natural-language inference) from a Hub repository or a folder.识别实体The names a text mentions and what each is - PER, LOC, ORG, MISC for most English models - in the order they appear.
Keras 层
相加Adds several branches of the same shape, element by element, as a residual connection does.批归一化Rescales its inputs to a steady mean and spread, batch by batch, which makes deeper networks train faster.拼接Joins several branches side by side, along their last axis.二维卷积A 2D convolution: small filters slid over a picture-shaped input (height, width, channels), each finding one kind of pattern.全连接层A fully connected layer: every output is a weighted sum of every input, then the activation.随机失活Drops a share of its inputs at random while training, against overfitting; does nothing when predicting.展平Lays a shaped input out as one row of numbers, as a Dense layer after convolutions needs.输入Where data enters the network: one example's shape, without the batch.层归一化Rescales each example's features to a steady mean and spread.二维最大池化Halves a picture-shaped input's width and height (by default), keeping the strongest value of each patch.
语言模型
提问Asks a chat model one question and answers with its reply: a one-message conversation, rendered through the model's chat template.对话Says a message in a conversation and answers with the model's reply, and the conversation with both added, to continue from.继续对话The model's next reply to a conversation that ends with the user's message.计算词元数How many tokens a text is to a model, which is what its length limits and Generation Settings count.生成文本Continues a text as the model would write it, without a chat template: the model's continuation alone, not the prompt.加载语言模型Loads a language model and its tokenizer from a Hugging Face Hub repository or a folder, downloading what is missing.加载 ONNX 语言模型Loads a language model to run on the ONNX backend: the repository's own ONNX file when it has one, such as one Export Language Model to ONNX wrote, otherwise a graph built from its checkpoint.流式对话Chat, with the reply handed to a function piece by piece as it is written - whole words, line by line - so it can be shown before it is finished.
视觉语言模型
询问图像Asks a question about a picture.询问多张图像Asks a question about several pictures at once, shown in order before the question.图像对话Says a message in a conversation, showing a picture with it, and answers with the model's reply and the conversation with both added, to continue from.描述图像Asks the model to describe a picture: "Describe this image."加载视觉语言模型Loads a vision language model and its processor from a Hugging Face Hub repository or a folder, downloading what is missing.创建图像数组Up to eight pictures as one array, for Ask About Images; unconnected inputs are left out.流式图像对话Chat About Image, with the reply handed to a function piece by piece as it is written, so it can be shown before it is finished.
图像生成
添加 ControlNetAdds a ControlNet to steer a picture: Generate Image, Transform Image or Inpaint Image follows its conditioning picture.用精修器收尾Finishes an SDXL picture with SDXL's refiner: the base model paints the first part of the steps and hands its unfinished picture over, and the refiner paints the rest.生成图像Paints a picture from a description, optionally following ControlNets and finished by SDXL's refiner.局部重绘图像Repaints the part of a picture a mask marks to match a description, and keeps the rest: inpainting, optionally following ControlNets and finished by SDXL's refiner.加载 ControlNetLoads a ControlNet, which makes a picture follow a conditioning picture such as an edge map, a depth map or a pose.加载图像生成器Loads a Stable Diffusion or SDXL pipeline from a Hub repository or a folder in diffusers' layout, with LoRAs when given.变换图像Repaints a picture to match a description, keeping its composition: img2img, optionally following ControlNets and finished by SDXL's refiner.
Keras 模型
构建 Keras 模型Makes a model of the layers between an input and an output.加载 Keras 模型Loads a model saved in Keras's .keras format, by this package or by Python's Keras.预测单个样本The model's answer for one example.用 Keras 模型预测The model's answers for the rows of a table, as a table with one column per output.保存 Keras 模型Saves a model in Keras's .keras format: its layers, weights and training setup in one file.训练 Keras 模型Trains a model on the rows of a table: some columns are what it sees, others what it should answer.
Hugging Face 模型库
缓存文件夹The folder downloaded models are kept in.已下载的模型The model repositories in the cache, with how much disk each takes.下载文件Downloads one file of a repository into the cache and answers with its path.下载模型Downloads a whole repository, or the files of it that match some patterns, into the cache, and answers with its folder.是否已下载Whether a repository has anything in the cache.
嵌入
余弦相似度How alike two embeddings are: 1 for the same direction, 0 for unrelated, -1 for opposite.嵌入A text's embedding.嵌入多段文本Several texts' embeddings.加载嵌入模型Loads an embedding model and its tokenizer from a Hub repository or a folder.按相似度排序Orders texts by how close in meaning each is to a query, closest first: semantic search over a short list.
语音模型
加载语音识别器Loads a speech recognizer, its feature extractor and its tokenizer from a Hub repository or a folder.转写What is said in a clip, as text.转写文件What is said in a WAV file, as text.带时间转写What is said in a clip, in the segments the recognizer heard, with when each starts and ends.逐词转写What is said in a clip, word by word, with when each word starts and ends: for subtitles that follow the voice, or to find where a word was said.
转写设置
深度学习运行时
描述运行时Which libtorch this distribution carries and what it can see, in one line.GPU 是否可用Whether models can run on an NVIDIA GPU here: the machine has one and a driver, and the distribution carries the CUDA build of libtorch.已加载的模型The models this program holds in memory now, one line each.卸载所有模型Frees every model this program has loaded.卸载模型Frees the memory a model holds.
文本到文本模型
加载文本到文本模型Loads a text-to-text model and its tokenizer from a Hub repository or a folder.摘要A shorter text saying what a longer one says.转换文本The model's answer to a text as it is, with no task prefix: what instruction-tuned models such as Flan-T5 are asked with.翻译Translates a text from one language to another, asked as T5 is asked: "translate English to German: ".
视觉模型
图像分类The labels that best describe a picture, best first, from those the classifier knows.零样本图像分类Scores a picture against labels written in words, best first; the scores add up to 1 across the labels given.加载图像分类器Loads an image classifier and its image processor from a Hub repository or a folder.加载零样本图像分类器Loads a zero-shot image classifier (an image and a text model trained together) from a Hub repository or a folder.