Views
No views yet
neuronx compatible checkpoints for upstage/SOLAR-10.7B-v1.0.
You can find detailed information about the base model on its Model Card.neuron format using specific input_shapes and compiler parameters detailed in the paragraphs below.optimum-neuron documentation for an explanation of these parameters.<update commands removed>from optimum.neuron import pipeline
p = pipeline('text-generation', 'aws-neuron/SOLAR-10.7B-v1.0-neuron')
p("Hi, my name is ",
do_sample=True,
top_k=10,
temperature=0.1,
top_p=0.95,
num_return_sequences=1,
max_length=200,
)Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.
2024-Jan-13 04:48:45.0857 15117:15313 [6] nccl_net_ofi_init:1415 CCOM WARN NET/OFI aws-ofi-nccl initialization failed
2024-Jan-13 04:48:45.0857 15117:15313 [6] init.cc:137 CCOM WARN OFI plugin initNet() failed is EFA enabled?
[{'generated_text': 'Hi, my name is ***** ***** I am calling from ***** ***** and I am calling to see if you have any questions about your ***** ***** account.\nHi, my name is ***** ***** I am calling from ***** ***** and I am calling to see if you have any questions about your ***** ***** account.\nHi, my name is ***** ***** I am calling from ***** ***** and I am calling to see if you have any questions about your ***** ***** account.\nHi, my name is ***** ***** I am calling from ***** ***** and I am calling to see if you have any questions about your ***** ***** account.\nHi, my name is ***** ***** I am calling from ***** ***** and I am calling to see if'}]from optimum.neuron import NeuronModelForCausalLM
#num_cores should be changed based on the instance. inf2.24xlarge has 6 neuron processors (they have two cores each) so 12 total
input_shapes = {"batch_size": 1, "sequence_length": 4096}
compiler_args = {"num_cores": 8, "auto_cast_type": 'fp16'}
model = NeuronModelForCausalLM.from_pretrained("upstage/SOLAR-10.7B-v1.0", export=True, **compiler_args, **input_shapes)
model.save_pretrained("SOLAR-10.7B-v1.0-neuron-24xlarge-2.16-8core-4096")
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("upstage/SOLAR-10.7B-v1.0")
tokenizer.save_pretrained("SOLAR-10.7B-v1.0-neuron-24xlarge-2.16-8core-4096")neuronx. When using with 🤗 optimum-neuron, use the repo revision specific to the version of neuronx you are using, to load the right serialized checkpoints.1{
2 "batch_size": 1,
3 "sequence_length": 4096,
4}1{
2 "auto_cast_type": "fp16",
3 "num_cores": 8,
4}