Views
No views yet

microsoft/Phi-3-mini-128k-instruct (3.82B params) (check phi3-license for usage). After training, we generated three smaller slices with parameter counts ranging from 1.33 billion to 2.01 billion. Furthermore, we seamlessly integrated these slices into NVIDIA's TensoRT-LLM, providing trtllm engines compatible with A100 and H100 GPUs, respectively.allenai/tulu-v2-sft-mixture, microsoft/orca-math-word-problems-200k, mlabonne/WizardLM_evol_instruct_70k-ShareGPT, and mlabonne/WizardLM_evol_instruct_v2_196K-ShareGPT. We advise users to exercise caution when utilizing ELM Turbo, as these datasets may contain factually incorrect information, unintended biases, inappropriate content, and other potential issues. It is recommended to thoroughly evaluate the model's outputs and implement appropriate safeguards for your specific use case.phi3-mini (3.82B params) model:slicexai/elm-turbo-0.125-instruct (1.33B params)slicexai/elm-turbo-0.25-instruct(1.56B params)slicexai/elm-turbo-0.50-instruct (2.01B params)1flash_attn==2.5.8
2torch==2.3.1
3accelerate==0.31.0
4transformers==4.41.2slicexai/elm-turbo-0.50-instruct1from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
2import torch
3
4elm_turbo_model = "slicexai/elm-turbo-0.50-instruct"
5model = AutoModelForCausalLM.from_pretrained(
6 elm_turbo_model,
7 device_map="cuda",
8 torch_dtype=torch.bfloat16,
9 trust_remote_code=True,
10 attn_implementation="flash_attention_2"
11)
12messages = [
13 {"role": "user", "content": "Can you provide ways to eat combinations of bananas and dragonfruits?"},
14]
15
16tokenizer = AutoTokenizer.from_pretrained(elm_turbo_model, legacy=False)
17pipe = pipeline(
18 "text-generation",
19 model=model,
20 tokenizer=tokenizer,
21)
22
23generation_args = {
24 "max_new_tokens": 500,
25 "return_full_text": False,
26 "repetition_penalty": 1.2,
27 "temperature": 0.0,
28 "do_sample": False,
29}
30
31output = pipe(messages, **generation_args)
32print(output[0]['generated_text']) elm_trtllm and install TensorRT-LLM. If you encounter any installation errors related to TensorRT-LLM, please refer to the troubleshooting section here.git clone https://github.com/slicex-ai/elm-turbo.git
cd elm-turbo
sh setup_trtllm.shelm_trtllm and installs tensorrt_llm.slicexai/elm-turbo-0.50-instruct on A100 & H100 gpus respectively,docker attach elm_trtllm
cd /lm
sh run_elm_turbo_trtllm_engine.sh slicexai/elm-turbo-0.50-instruct A100 "plan a fun day with my grandparents."
sh run_elm_turbo_trtllm_engine.sh slicexai/elm-turbo-0.50-instruct H100 "plan a fun day with my grandparents."Usage: sh run_elm_turbo_trtllm_engine.sh <elm_turbo_model_id> <gpu_type> "<input_prompt>"
Supported elm-turbo_model_id choices : [slicexai/elm-turbo-0.50-instruct, slicexai/elm-turbo-0.25-instruct, slicexai/elm-turbo-0.125-instruct]
Supported gpu_types : [A100, H100]slicexai/elm-turbo-0.50-instruct tensortrt_llm engine with INT-8 quantization, follow the instructions below. For more detailed configurations, refer to the Phi3 conversion instructions provided by NVIDIA here.1docker attach elm_trtllm
2cd /lm/TensorRT-LLM/examples/phi
3pip install flash_attn
4huggingface-cli download slicexai/elm-turbo-0.50-instruct --local-dir ../slicexai/elm-turbo-0.50-instruct
5python3 convert_checkpoint.py --dtype bfloat16 --use_weight_only --weight_only_precision int8 --model_dir ../slicexai/elm-turbo-0.50-instruct --output_dir ../slicexai/elm-turbo-0.50-instruct-trtllm-ckpt
6trtllm-build --gpt_attention_plugin bfloat16 --gemm_plugin bfloat16 --max_seq_len 4096 --max_batch_size 256 --checkpoint_dir ../slicexai/elm-turbo-0.50-instruct-trtllm-ckpt --output_dir ../slicexai/elm-turbo-0.50-instruct-trtllm-engine1python3 ../run.py \
2 --engine_dir ../slicexai/elm-turbo-0.50-instruct-trtllm-engine \
3 --max_output_len 512 \
4 --presence_penalty 0.7 \
5 --frequency_penalty 0.7 \
6 --tokenizer_dir ../slicexai/elm-turbo-0.50-instruct \
7 --input_text """<s><|user|>
8plan a fun day with my grandparents.<|end|>
9<|assistant|>
10"""