Karols commited on
Commit
4c8b5b6
1 Parent(s): 15ea92b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -26
README.md CHANGED
@@ -20,39 +20,21 @@ Model based on `paulml/OGNO-7B` (downstream version of Mistral7B) finetuned usin
20
 
21
  You can use this model directly with a Hugging Face pipeline:
22
  ```python
23
- import ...
24
 
25
- base_model_name = "bardsai/jaskier-7b-dpo-v5.6"
26
- p = pipeline("conversational", model=base_model_name, torch_dtype=torch.float16, device_map="auto")
27
- messages = [{'messages':[{
28
- "role": "user",
29
- "content": "Can Poland into space?"
30
- }]},
31
- {'messages':[{
32
- "role": "user",
33
- "content": "Tell me where the nearest water park is?"
34
- }]},
35
- ]
36
-
37
- def conversations():
38
- for x in tqdm(messages):
39
- yield Conversation(x['messages'])
40
 
41
- generate_kwargs = {
42
- "do_sample": True,
43
- "temperature": 0.7,
44
- "max_new_tokens": 1024,
45
- }
46
- model_outputs = [out[-1]['content'] for out in p(conversations(), **generate_kwargs)]
47
-
48
- print(model_outputs)
49
 
50
  ```
51
 
52
  ## Output
53
 
54
- >["Poland, as a nation, invests in and collaborates with the international space community, primarily through the Polish Space Agency and the Institute of Space Physics of the Polish Academy of Sciences. They don't physically send Poland to space, but work on advances, technology, and scientific research related to space exploration."]
55
- >["As an AI, I don't have real-time physical location or personal experiences. I can't provide location-specific information. Please, consider asking a fellow human for such details."]
56
 
57
  If you still find any issues with "INST" character chain appearing in generated output, try our newest model: https://huggingface.co/bardsai/jaskier-7b-dpo-v6.1 . Re-tasking the prompt can also help.
58
  ## Changelog
 
20
 
21
  You can use this model directly with a Hugging Face pipeline:
22
  ```python
 
23
 
24
+ from transformers import pipeline, Conversation
25
+ import torch
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
+ base_model_name = "bardsai/jaskier-7b-dpo-v5.6"
28
+ chatbot = pipeline("conversational", model=base_model_name, torch_dtype=torch.float16, device_map="auto")
29
+ conversation = Conversation("Can Poland run into space?")
30
+ conversation = chatbot(conversation)
31
+ print(conversation.messages[-1]["content"])
 
 
 
32
 
33
  ```
34
 
35
  ## Output
36
 
37
+ "Poland, as a nation, doesn't physically run or possess the capability to physically travel into space. However, Poland, like many other countries, supports scientific research and space exploration through its institutions and collaborations with international space agencies."
 
38
 
39
  If you still find any issues with "INST" character chain appearing in generated output, try our newest model: https://huggingface.co/bardsai/jaskier-7b-dpo-v6.1 . Re-tasking the prompt can also help.
40
  ## Changelog