How to use instruction-pretrain/InstructLM-1.3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="instruction-pretrain/InstructLM-1.3B")
# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("instruction-pretrain/InstructLM-1.3B") model = AutoModelForCausalLM.from_pretrained("instruction-pretrain/InstructLM-1.3B")
How to use instruction-pretrain/InstructLM-1.3B with vLLM:
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "instruction-pretrain/InstructLM-1.3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "instruction-pretrain/InstructLM-1.3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'
docker model run hf.co/instruction-pretrain/InstructLM-1.3B
How to use instruction-pretrain/InstructLM-1.3B with SGLang:
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "instruction-pretrain/InstructLM-1.3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "instruction-pretrain/InstructLM-1.3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "instruction-pretrain/InstructLM-1.3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "instruction-pretrain/InstructLM-1.3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'
How to use instruction-pretrain/InstructLM-1.3B with Docker Model Runner:
Error: Api error with status 403. URL: https://cdn-lfs-us-1.huggingface.co/repos/aa/03/aa036474482e60d7978a206bc4089c0493fee7e97a13b95b593ef09aaa2f5489/127f1b69e741ce178bbf059d9b40db9bbf6752d4eef4bf7653a252a320f0cbb7?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27model-00001-of-00002.safetensors%3B+filename%3D%22model-00001-of-00002.safetensors%22%3B&Expires=1719302679&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcxOTMwMjY3OX19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy11cy0xLmh1Z2dpbmdmYWNlLmNvL3JlcG9zL2FhLzAzL2FhMDM2NDc0NDgyZTYwZDc5NzhhMjA2YmM0MDg5YzA0OTNmZWU3ZTk3YTEzYjk1YjU5M2VmMDlhYWEyZjU0ODkvMTI3ZjFiNjllNzQxY2UxNzhiYmYwNTlkOWI0MGRiOWJiZjY3NTJkNGVlZjRiZjc2NTNhMjUyYTMyMGYwY2JiNz9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSoifV19&Signature=srt81BxCTdEe-LlUKcqA8dAXI
Thanks so much for reporting this, I've updated the model weights.
· Sign up or log in to comment