Karols commited on
Commit
e050aee
1 Parent(s): aa3528c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -25
README.md CHANGED
@@ -20,38 +20,21 @@ Model based on `bardsai/jaskier-7b-dpo-v5.6` (downstream version of Mistral7B) f
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": "How much is 2+2"
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
- >["The answer to the arithmetic operation of adding two to two is 4. In mathematical notation, it's written as 2 + 2 = 4.", "As an AI, I don't have physical proximity or real-time environment awareness. To provide location-based information, I need to be integrated with a specific location-tracking system or connected to a comprehensive database. Please check for local business listings, travel guides, or conduct an online search to find the nearest water park according to your current location."]
55
 
56
  ## Changelog
57
 
 
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-v6.1"
28
+ chatbot = pipeline("conversational", model=base_model_name, torch_dtype=torch.float16, device_map="auto")
29
+ conversation = Conversation("Can Poland 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 travel to space. However, Poland has contributed to the field of space exploration through its scientists, engineers, and collaborations with international space agencies. The Polish Space Agency, established in 2016, aims to promote and coordinate the country's space activities."
38
 
39
  ## Changelog
40