JittorLLMs
随着ChatGPT的推出,大模型正在快速地发展,国内同样涌现出一大批优秀的大模型研究,然而,大模型高昂的配置、复杂的环境要求让人望而却步。非十科技领衔,与清华大学可视媒体研究中心合作,研发了大模型推理库JittorLLMs,希望为国内大模型的研究提供软硬件的支撑。
JDet是基于Jittor的遥感目标检测算法库。JDet目前提供了4个主流遥感目标检测:S2ANet、Gliding、RetinaNet和Faster R-CNN,其他主流模型陆续添加中。
医学图像分割
Jittor Medical Segmentation Lib -- The assignment of Pattern Recognition course (2021 Spring) in Tsinghua University.
DeepFaceDrawing
One version of our system is implemented using the Jittor, and you need to install Jittor first. We will also provide a version in pytorch.
JittorVis
JittorVis is an open-source library for understanding the inner workings of Jittor models by visually illustrating their dataflow graphs.
DeepFaceEditing
Deep Face Generation and Editing with Disentangled Geometry and Appearance Control.
SINet-V2
Concealed Object Detection (SINet-V2, IEEE TPAMI 2021). Code using Jittor Framework is available.
hlagcn
Jittor implementation of the paper "Hierarchical Layout-Aware Graph Convolutional Network for Unified Aesthetics Assessment".
Jittor-Image-Models
About Jittor Image Models is a library for pulling together a wide variety of SOTA deep learning models in the Jittor framework.
di-fusion-network-jittor
Jittor implementation of the network architecture in DI-Fusion: Online Implicit 3D Reconstruction with Deep Priors.
PRS-Net
This repository is code release for PRS-Net: Planar Reflective Symmetry Detection Net for 3D Models.
PFSegNets
This repo contains the the implementation of CVPR-2021 work: PointFlow: Flowing Semantics Through Points for Aerial Image Segmentation by Jittor.
APDrawingGAN
We provide Jittor implementations for our CVPR 2019 oral paper "APDrawingGAN: Generating Artistic Portrait Drawings from Face Photos with Hierarchical GANs".
APDrawingGAN2
We provide Jittor implementations for our TPAMI 2020 paper "Line Drawings for Face Portraits from Photos using Global and Local Structure based GANs".
CMIC-Retrieval
Code for Single Image 3D Shape Retrieval via Cross-Modal Instance and Category Contrastive Learning. ICCV 2021.
Unpaired-Portrait-Drawing
We provide Jittor implementations for our CVPR 2020 paper "Unpaired Portrait Drawing Generation via Asymmetric Cycle Mapping".
Jittor-MLP
Unofficial Implementation of MLP-Mixer, gMLP, resMLP, Vision Permutator, S2MLPv2, ConvMLP, ConvMixer in Jittor.
Jittor(计图): 即时编译深度学习框架
Jittor 是一个基于即时编译和元算子的高性能深度学习框架,整个框架在即时编译的同时,还集成了强大的Op编译器和调优器,为您的模型生成定制化的高性能代码。
Jittor前端语言为Python。前端使用了模块化的设计,类似于PyTorch,Keras,后端则使用高性能语言编写,如CUDA,C++。
下面的代码演示了如何一步一步使用Python代码,从头对一个双层神经网络建模。
import jittor as jt
from jittor import Module
from jittor import nn
class Model(Module):
def __init__(self):
self.layer1 = nn.Linear(1, 10)
self.relu = nn.Relu()
self.layer2 = nn.Linear(10, 1)
def execute (self,x) :
x = self.layer1(x)
x = self.relu(x)
x = self.layer2(x)
return x
def get_data(n): # generate random data for training test.
for i in range(n):
x = np.random.rand(batch_size, 1)
y = x*x
yield jt.float32(x), jt.float32(y)
model = Model()
learning_rate = 0.1
optim = nn.SGD(model.parameters(), learning_rate)
for i,(x,y) in enumerate(get_data(n)):
pred_y = model(x)
loss = ((pred_y - y)**2)
loss_mean = loss.mean()
optim.step (loss_mean)
print(f"step {i}, loss = {loss_mean.data.sum()}")
在教程部分,我们将简要解释Jittor的基本概念。
要使用Jittor训练模型,您需要了解两个主要概念:
Var:Jittor的基本数据类型
Operations:Jittor的算子与numpy类似
首先,让我们开始使用Var。Var是jittor的基本数据类型,为了运算更加高效Jittor中的计算过程是异步的。 如果要访问数据,可以使用Var.data
进行同步数据访问。
import jittor as jt
a = jt.float32([1,2,3])
print (a)
print (a.data)
# Output: float32[3,]
# Output: [ 1. 2. 3.]
此外我们可以给变量起一个名字。
a.name('a')
print(a.name())
# Output: a
Jittor的算子与numpy类似。 让我们尝试一些运算, 我们通过Opjt.float32
创建Var a
和b
,并将它们相加。 输出这些变量相关信息,可以看出它们具有相同的形状和类型。
import jittor as jt
a = jt.float32([1,2,3])
b = jt.float32([4,5,6])
c = a*b
print(a,b,c)
print(type(a), type(b), type(c))
# Output: float32[3,] float32[3,] float32[3,]
# Output: <class 'jittor_core.Var'> <class 'jittor_core.Var'> <class 'jittor_core.Var'>
除此之外,我们使用的所有算子jt.xxx(Var,...)
都具有别名Var.xxx(...)
。 例如:
c.max() # alias of jt.max(a)
c.add(a) # alias of jt.add(c, a)
c.min(keepdims=True) # alias of jt.min(c, keepdims=True)
如果您想知道Jittor支持的所有运算,可以运行help(jt.ops)
。 您在jt.ops.xxx
中找到的所有运算都可以通过别名jt.xxx
。