این یه مقاله کامل نیست و احتمالا پر اشتباه باشه پس اگه میبینید جایی ایراد داره اطلاع بدید ممنونم.
سیستم عامل گنو/لینوکس اوبونتو
height: 600 | |
scrolling: no | |
border: yes |
These libraries can be used to quickly create a GUI for configureable parameters using sliders, checkboxes, colors pickers etc
import { WsAdapter } from '@nestjs/platform-ws'; | |
import { MessageMappingProperties } from '@nestjs/websockets'; | |
import { EMPTY as empty, Observable } from 'rxjs'; | |
export class CustomWsAdapter extends WsAdapter { | |
public bindMessageHandler( | |
buffer: any, | |
handlers: MessageMappingProperties[], | |
transform: (data: any) => Observable<any>, | |
): Observable<any> { |
# Taken from https://johanwind.github.io/2023/03/23/rwkv_details.html. | |
# I've added additional comments restructured it a tiny bit, which makes it clearer for me. | |
import numpy as np | |
from torch import load as torch_load # Only for loading the model weights | |
from tokenizers import Tokenizer | |
exp = np.exp | |
layer_norm = lambda x, w, b : (x - np.mean(x)) / np.std(x) * w + b | |
sigmoid = lambda x : 1/(1 + exp(-x)) |
# Based on younesbelkada/finetune_llama_v2.py | |
# Install the following libraries: | |
# pip install accelerate==0.21.0 peft==0.4.0 bitsandbytes==0.40.2 transformers==4.31.0 trl==0.4.7 scipy | |
from dataclasses import dataclass, field | |
from typing import Optional | |
import torch | |
from datasets import load_dataset | |
from transformers import ( |