NEO
?Neo-Models | ?Neo-Datasets | Github
Neo is a completely open source large language model, including code, all model weights, datasets used for training, and training details.
Model
Model | Describe | Download |
---|---|---|
neo_7b | This repository contains the base model of neo_7b | • ? Hugging Face |
neo7bsft_v0.1 | This repository contains the supervised fine-tuning version of the neo_7b model. | • ? Hugging Face |
neo7binstruct_v0.1 | This repository contains the instruction-tuned version of the neo_7b model. | • ? Hugging Face |
neo7bintermediate | This repo contains normal pre-training intermediate ckpts. A total of 3.7T tokens were learned at this phase. | • ? Hugging Face |
neo7bdecay | This repo contains intermediate ckpts during the decay phase. A total of 720B tokens were learned at this phase. | • ? Hugging Face |
neoscalinglaw980M | This repo contains ckpts related to scalinglaw experiments | • ? Hugging Face |
neoscalinglaw460M | This repo contains ckpts related to scalinglaw experiments | • ? Hugging Face |
neoscalinglaw250M | This repo contains ckpts related to scalinglaw experiments | • ? Hugging Face |
neo2bgeneral | This repo contains ckpts of 2b model trained using common domain knowledge | • ? Hugging Face |
Usage
from modelscope import AutoModelForCausalLM, AutoTokenizer
model_path = 'm-a-p/neo_7b_instruct_v0.1'
tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_path,
device_map="auto",
torch_dtype='auto'
).eval()
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "你好,你是谁?"},
]
input_ids = tokenizer.apply_chat_template(conversation=messages, add_generation_prompt=True, return_tensors='pt')
output_ids = model.generate(input_ids.to('cuda'), max_new_tokens=512)
response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
print(response)
评论