backprop
1.0.0
backprop使得使用、微调和部署最先进的 ML 模型变得简单。
使用预先训练的模型解决各种任务,或者针对您自己的任务在一行中对其进行微调。
您可以使用backprop解决开箱即用的任务:
对于更具体的用例,您可以通过微调来调整具有少量数据和单行代码的任务。
⚡ 开始使用 | 安装,几分钟介绍 |
---|---|
示例 | 微调和使用示例 |
?文档 | 有关任务推理和微调的深入文档 |
型号 | 可用型号概览 |
通过 PyPi 安装backprop传播:
pip install backprop
任务充当接口,让您轻松使用各种受支持的模型。
import backprop
context = "Take a look at the examples folder to see use cases!"
qa = backprop . QA ()
# Start building!
answer = qa ( "Where can I see what to build?" , context )
print ( answer )
# Prints
"the examples folder"
您可以在自己的机器上运行所有任务和模型,或者使用我们的推理 API 在生产中运行,只需指定您的api_key
即可。
了解如何使用所有可用任务。
每个任务都实现微调,让您可以通过一行代码调整模型以适应您的特定用例。
经过微调的模型可以轻松上传到生产环境,让您专注于构建出色的应用程序。
import backprop
tg = backprop . TextGeneration ( "t5-small" )
# Any text works as training data
inp = [ "I really liked the service I received!" , "Meh, it was not impressive." ]
out = [ "positive" , "negative" ]
# Finetune with a single line of code
tg . finetune ({ "input_text" : inp , "output_text" : out })
# Use your trained model
prediction = tg ( "I enjoyed it!" )
print ( prediction )
# Prints
"positive"
# Upload to backprop for production ready inference
# Describe your model
name = "t5-sentiment"
description = "Predicts positive and negative sentiment"
tg . upload ( name = name , description = description , api_key = "abc" )
请参阅其他任务的微调。
无需经验
数据是瓶颈
有海量的模型
经济有效地部署模型是一项艰巨的工作
查看我们的文档以了解深入的任务推理和微调。
最先进模型的精选列表。
使用 CLIP 进行零样本图像分类。
backprop依赖于许多优秀的库来工作,最值得注意的是:
发现错误或对新任务和模型有想法?打开一个问题。