Downloads · 30 days
11
44% of all-time downloads
RichardErkhov/PhelixZhen_-_Algae-550M-8bits
PhelixZhen_-_Algae-550M-8bits is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
11
44% of all-time downloads
All-time downloads
25
Public
Parameters
555M
685 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors685 MB · 99%
How the weights are stored.
I8426M · 77%
From the Hugging Face model README
Quantization made by Richard Erkhov.
Algae-550M - bnb 8bits
The model adopts the Phi architecture, with 550 million parameters. It only supports English and does not support code writing.
The model's dataset is obtained by cleaning and deduplicating open-source datasets, with pre-training using approximately 30 billion instances.
If you are a native English speaker, you might find these sentences uncomfortable to read because the training of this model and the writing of this document were only completed by a very inexperienced Chinese high school student.
Anyway, this is a new attempt. It is trained on consumer-grade devices and without the guidance of professionals, so it's hard for us to expect it to perform exceptionally well.
But we hope this will be the beginning of a new great exploration.
(We have released a preview version on February 24, 2024, and you can run it using the following code:
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
import torch
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
tokenizer = AutoTokenizer.from_pretrained('pathtotokenizer')
model = AutoModelForCausalLM.from_pretrained('pathtomodel').to(device)
tokenizer.pad_token = tokenizer.eos_token
txt = 'inputtext'
# greedy search
gen_conf = GenerationConfig(
num_beams=1,
do_sample=True,
max_length=700,
no_repeat_ngram_size=6,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.pad_token_id,
temperature=0.93,
top_k=36,
top_p=0.80
)
tokend = tokenizer.encode_plus(text=txt)
input_ids, attention_mask = torch.LongTensor([tokend.input_ids]).to(device), \
torch.LongTensor([tokend.attention_mask]).to(device)
outputs = model.generate(
inputs=input_ids,
attention_mask=attention_mask,
generation_config=gen_conf,
)
outs = tokenizer.decode(outputs[0].cpu().numpy(), clean_up_tokenization_spaces=True,)
print(outs)