Sirclavin commited on
Commit
63746b7
·
1 Parent(s): 00f3de0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +96 -1
README.md CHANGED
@@ -50,4 +50,99 @@ repetition_penalty: 1.15
50
  do_sample: true
51
  temperature: 0.5
52
  top_p: 0.5
53
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  do_sample: true
51
  temperature: 0.5
52
  top_p: 0.5
53
+ ```
54
+
55
+
56
+
57
+
58
+
59
+ # InstructWise 470M - A virtual assistant.
60
+
61
+ Introduction- InstructWise is a model created to act as helpful virtual assistant while maintaing the memory efficiency, this model was fine-tuned on
62
+ ## Features
63
+
64
+ - **Creative Content Generation:** NeXGen excels at generating creative writing, including stories, poetry, and fictional narratives.
65
+ - **Contextual Awareness:** The model understands context, ensuring coherent and contextually appropriate responses.
66
+ - **User-Friendly Interface:** NeXGen offers an intuitive and user-friendly interface for seamless integration into various applications.
67
+ - **Versatility:** From content creation to educational support, NeXGen adapts to different writing styles and applications.
68
+ - **Advanced Architecture:** Built on the latest advancements in natural language processing, NeXGen offers high-quality text generation.
69
+
70
+ ## Uses
71
+
72
+ NeXGen finds application in various domains, including:
73
+
74
+ - **Content Creation:** Generate marketing copy, stories, and product descriptions.
75
+ - **Assistance in Writing:** Aid authors, bloggers, and students in drafting articles and essays.
76
+ - **Chatbot Development:** Power conversational agents with human-like responses.
77
+ - **Prototyping and Idea Generation:** Facilitate brainstorming sessions for product development.
78
+ - **Social Media Content:** Generate engaging captions for social media posts.
79
+ - **Personal Assistant Applications:** Assist users in drafting emails and messages.
80
+
81
+ ## Direct Use Cases
82
+
83
+ NeXGen can be directly employed for:
84
+
85
+ - **Automated Email Drafting:** Quickly compose emails with NeXGen's assistance.
86
+ - **Blog Post Generation:** Generate sections or entire articles based on a given topic.
87
+ - **Code Commenting:** Improve code documentation with clear and concise comments.
88
+ - **Storyline Creation for Games:** Create dynamic and engaging storylines for video games.
89
+ - **Learning Material Generation:** Develop study guides and educational content.
90
+ - **Personal Journaling Assistance:** Receive prompts and suggestions for journaling.
91
+
92
+ ## Getting Started
93
+
94
+ To download NeXGen use this code:
95
+ ```python
96
+ from transformers import AutoTokenizer, AutoModelForCausalLM
97
+
98
+ # Specify the model name from Hugging Face Model Hub
99
+ model_name = "CrabfishAI/NeXGen-small"
100
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
101
+ model = AutoModelForCausalLM.from_pretrained(model_name)
102
+
103
+ def generate_text(prompt, max_length=100, num_beams=5, no_repeat_ngram_size=2, top_k=50, top_p=0.95, temperature=0.7):
104
+ input_ids = tokenizer.encode(prompt, return_tensors="pt")
105
+
106
+ # Ensure attention_mask is provided
107
+ attention_mask = input_ids.ne(tokenizer.pad_token_id).float()
108
+
109
+ # Generate output text
110
+ output = model.generate(
111
+ input_ids,
112
+ max_length=max_length,
113
+ num_beams=num_beams,
114
+ no_repeat_ngram_size=no_repeat_ngram_size,
115
+ top_k=top_k,
116
+ top_p=top_p,
117
+ temperature=temperature,
118
+ attention_mask=attention_mask # Pass attention_mask to the generation method
119
+ )
120
+
121
+ decoded_output = tokenizer.decode(output[0], skip_special_tokens=True)
122
+ return decoded_output
123
+
124
+ # Example usage:
125
+ prompt = "Your prompt here"
126
+ generated_text = generate_text(prompt, max_length=200)
127
+
128
+ print("Generated Text:")
129
+ print(generated_text)
130
+ ```
131
+
132
+ ## Limitation
133
+
134
+ 1. **Content Quality**: The model's output may vary in quality, and there's a possibility it might generate content that is nonsensical, irrelevant, or grammatically incorrect.
135
+
136
+ 2. **Bias and Sensitivity**: The model is trained on diverse data, but it may inadvertently exhibit biases or generate content that is sensitive or inappropriate. Exercise caution and review generated text before use.
137
+
138
+ 3. **Inappropriate Language**: The model might generate text that includes offensive language or inappropriate content. Be mindful of this, especially in applications where maintaining a respectful and inclusive tone is essential.
139
+
140
+ 4. **Ambiguous Prompts**: The quality of generated text is highly dependent on the prompt provided. Ambiguous or unclear prompts may result in less coherent or relevant outputs.
141
+
142
+ ## Disclaimer
143
+
144
+ - **Use with Caution**: This model is a tool that should be used with caution. Always review and validate the generated text before incorporating it into any application or publication.
145
+
146
+ - **Not for Critical Applications**: Avoid using the model for critical applications where accuracy and reliability are paramount. The model is intended for creative and exploratory purposes.
147
+
148
+ - **Ongoing Improvement**: The model may be updated or fine-tuned for better performance. Stay informed about updates and consider using the latest version for improved results.