File size: 1,872 Bytes
b0da260
 
 
 
 
 
 
 
 
 
0af2ea7
b0da260
6ea665a
b0da260
 
541f52a
 
 
 
84bd18e
 
 
 
 
541f52a
84bd18e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b0da260
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
language:
- en
license: apache-2.0
tags:
- text-generation-inference
- transformers
- unsloth
- llama
- trl
- sft
base_model: 01-ai/Yi-9B
datasets: jondurbin/airoboros-3.2
---

# airoboros-9b-3.2

Prompt Template: ChatML

```python
from openai import OpenAI
# Set OpenAI's API key and API base to use vLLM's API server.
openai_api_key = "EMPTY"
openai_api_base = "http://localhost:8000/v1"

client = OpenAI(
    api_key=openai_api_key,
    base_url=openai_api_base,
)

system = """
BEGININPUT
BEGINCONTEXT
date: 2021-01-01
url: https://web.site/123
ENDCONTEXT
In a shocking turn of events, blueberries are now green, but will be sticking with the same name.
ENDINPUT
BEGININSTRUCTION
{user}
ENDINSTRUCTION
"""

user = "What is the new color of blueberries?"
chat_response = client.chat.completions.create(
    model="macadeliccc/airoboros-9b-3.2",
    messages=[
        {"role": "system", "content": system},
        {"role": "user", "content": user},
    ]
)
print("Chat response:", chat_response)
```
## Expected Output

```
Chat response: ChatCompletion(id='cmpl-6bce7c051ffd41878624683faea90719', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='Blueberries are now green.', role='assistant', function_call=None, tool_calls=None))], created=273292, model='macadeliccc/airoboros-9b-3.2', object='chat.completion', system_fingerprint=None, usage=CompletionUsage(completion_tokens=7, prompt_tokens=119, total_tokens=126))

```

- **Developed by:** macadeliccc
- **License:** apache-2.0
- **Finetuned from model :** 01-ai/Yi-9B

This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.

[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)