munish0838 commited on
Commit
84bebd8
·
verified ·
1 Parent(s): e07ef9a

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +69 -0
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ library_name: transformers
5
+ license: apache-2.0
6
+ tags:
7
+ - autotrain
8
+ - text-generation-inference
9
+ - text-generation
10
+ - peft
11
+ - generated_from_trainer
12
+ - mistral
13
+ - transformers
14
+ - Inference Endpoints
15
+ - pytorch
16
+ base_model: mistralai/Mistral-7B-Instruct-v0.2
17
+ model-index:
18
+ - name: Mental-Health_ML
19
+ results: []
20
+ datasets:
21
+ - Amod/mental_health_counseling_conversations
22
+ inference: true
23
+ widget:
24
+ - messages:
25
+ - role: user
26
+ content: What is your favorite condiment?
27
+
28
+ ---
29
+
30
+ [![QuantFactory Banner](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)](https://hf.co/QuantFactory)
31
+
32
+
33
+ # QuantFactory/Mental-Health-FineTuned-Mistral-7B-Instruct-v0.2-GGUF
34
+ This is quantized version of [prabureddy/Mental-Health-FineTuned-Mistral-7B-Instruct-v0.2](https://huggingface.co/prabureddy/Mental-Health-FineTuned-Mistral-7B-Instruct-v0.2) created using llama.cpp
35
+
36
+ # Original Model Card
37
+
38
+
39
+ # Model Trained Using AutoTrain
40
+
41
+ This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) on the [mental_health_counseling_conversations](https://huggingface.co/datasets/Amod/mental_health_counseling_conversations) dataset.
42
+
43
+ # Usage
44
+
45
+ ```python
46
+
47
+ from transformers import AutoModelForCausalLM, AutoTokenizer
48
+
49
+ model_path = "prabureddy/Mental-Health-FineTuned-Mistral-7B-Instruct-v0.2"
50
+
51
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
52
+ model = AutoModelForCausalLM.from_pretrained(
53
+ model_path,
54
+ device_map="auto",
55
+ torch_dtype='auto'
56
+ ).eval()
57
+
58
+ # Prompt content: "hi"
59
+ messages = [
60
+ {"role": "user", "content": "Hey Alex! I have been feeling a bit down lately.I could really use some advice on how to feel better?"}
61
+ ]
62
+
63
+ input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
64
+ output_ids = model.generate(input_ids.to('cuda'))
65
+ response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
66
+
67
+ # Model response: "Hello! How can I assist you today?"
68
+ print(response)
69
+ ```