Views
No views yet

<|im_start|>system
You are Orca Mini, a helpful AI assistant.<|im_end|>
<|im_start|>user
Hello Orca Mini, what can you do for me?<|im_end|>
<|im_start|>assistant1from transformers import AutoModel, AutoTokenizer
2model_slug = "pankajmathur/orca_mini_v7_7b"
3model = AutoModel.from_pretrained(model_slug)
4tokenizer = AutoTokenizer.from_pretrained(model_slug)
5messages = [
6 {"role": "system", "content": "You are Orca Mini, a helpful AI assistant."},
7 {"role": "user", "content": "Hello Orca Mini, what can you do for me?"}
8]
9gen_input = tokenizer.apply_chat_template(messages, return_tensors="pt")
10model.generate(**gen_input)pip install "vllm>=0.4.3"config.json file by including the below snippet:1 {
2 "architectures": [
3 "Qwen2ForCausalLM"
4 ],
5 // ...
6 "vocab_size": 152064,
7 // adding the following snippets
8 "rope_scaling": {
9 "factor": 4.0,
10 "original_max_position_embeddings": 32768,
11 "type": "yarn"
12 }
13 }python -u -m vllm.entrypoints.openai.api_server --model pankajmathur/orca_mini_v7_7b1curl http://localhost:8000/v1/chat/completions \
2 -H "Content-Type: application/json" \
3 -d '{
4 "model": "pankajmathur/orca_mini_v7_7b",
5 "messages": [
6 {"role": "system", "content": "You are Orca Mini, a helpful AI assistant."},
7 {"role": "user", "content": "Hello Orca Mini, what can you do for me?"}
8 ]
9 }'rope_scaling configuration only when processing long contexts is required.