Notice: file_put_contents(): Write of 17082 bytes failed with errno=28 No space left on device in /var/www/tgoop/post.php on line 50
PyTorch Howsam@pytorch_howsam P.514
PYTORCH_HOWSAM Telegram 514
PyTorch Howsam
در مقاله زیر، شبکه Kolmogorov-Arnold Networks (KAN) پیشنهاد شده که مولفانش اون رو آلترناتیوی برای MLP میدونن که البته دقیق‌تر و تفسیرپذیرتر هست. حالا چیکار کردن؟ ما توی شبکه MLP، اکتیویشن فانکشن رو روی نورون میذاریم (یعنی آخر کار میذاریم). اما، توی این مقاله،…
.
بعد از معرفی شبکه KAN، حالا کارهای مختلفی مبتنی بر این شبکه داره انجام میشه. یکی از کارهای جالب، ترکیب GPT و KAN هست. در ریپوی گیتهاب زیر، دو کد minGPT با pyKAN ترکیب شده. نمونه کدش:

from kan_gpt.model import GPT
from transformers import GPT2Tokenizer

model_config = GPT.get_default_config()
model_config.model_type = "gpt2"
model_config.vocab_size = 50257
model_config.block_size = 1024
model = GPT(model_config)

tokenizer = GPT2Tokenizer.from_pretrained('gpt2')

prompt = "Bangalore is often described as the "

prompt_encoded = tokenizer.encode(
text=prompt, add_special_tokens=False
)

x = torch.tensor(prompt_encoded).unsqueeze(0)

model.eval()
y = model.generate(x, 50) # sample 50 tokens

result = tokenizer.decode(y)

print(result)

# Bangalore is often described as the Silicon Valley of India.
# The city has witnessed rapid growth in the past two decades.....


لینک ریپوی گیتهاب KAN-GPT

@pytorch_howsam



tgoop.com/pytorch_howsam/514
Create:
Last Update:

.
بعد از معرفی شبکه KAN، حالا کارهای مختلفی مبتنی بر این شبکه داره انجام میشه. یکی از کارهای جالب، ترکیب GPT و KAN هست. در ریپوی گیتهاب زیر، دو کد minGPT با pyKAN ترکیب شده. نمونه کدش:

from kan_gpt.model import GPT
from transformers import GPT2Tokenizer

model_config = GPT.get_default_config()
model_config.model_type = "gpt2"
model_config.vocab_size = 50257
model_config.block_size = 1024
model = GPT(model_config)

tokenizer = GPT2Tokenizer.from_pretrained('gpt2')

prompt = "Bangalore is often described as the "

prompt_encoded = tokenizer.encode(
text=prompt, add_special_tokens=False
)

x = torch.tensor(prompt_encoded).unsqueeze(0)

model.eval()
y = model.generate(x, 50) # sample 50 tokens

result = tokenizer.decode(y)

print(result)

# Bangalore is often described as the Silicon Valley of India.
# The city has witnessed rapid growth in the past two decades.....


لینک ریپوی گیتهاب KAN-GPT

@pytorch_howsam

BY PyTorch Howsam


Share with your friend now:
tgoop.com/pytorch_howsam/514

View MORE
Open in Telegram


Telegram News

Date: |

The imprisonment came as Telegram said it was "surprised" by claims that privacy commissioner Ada Chung Lai-ling is seeking to block the messaging app due to doxxing content targeting police and politicians. With the administration mulling over limiting access to doxxing groups, a prominent Telegram doxxing group apparently went on a "revenge spree." Telegram Channels requirements & features The administrator of a telegram group, "Suck Channel," was sentenced to six years and six months in prison for seven counts of incitement yesterday. The visual aspect of channels is very critical. In fact, design is the first thing that a potential subscriber pays attention to, even though unconsciously.
from us


Telegram PyTorch Howsam
FROM American