SVECTOR-OFFICIAL commited on
Commit
b0f2ed7
·
verified ·
1 Parent(s): 3758c75

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +289 -3
README.md CHANGED
@@ -1,3 +1,289 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - text-generation
5
+ pipeline_tag: text-generation
6
+ ---
7
+
8
+ <p align="center">
9
+ <img alt="Continue-1-OSS" src="https://github.com/SVECTOR-CORPORATION/Continue-1-OSS/blob/main/Continue-1-OSS-image-banner.jpg?raw=true" width="800">
10
+ </p>
11
+
12
+ # Continue-1-OSS
13
+
14
+ ### Advanced Text Generation Model
15
+
16
+ <div align="left" style="line-height: 1;">
17
+ <a href="https://spec-chat.tech" target="_blank" style="margin: 2px;">
18
+ <img alt="SVECTOR" src="https://img.shields.io/badge/💬%20Spec%20Chat-Spec%20Chat-blue?style=plastic" style="display: inline-block; vertical-align: middle;"/>
19
+ </a>
20
+
21
+ <a href="https://huggingface.co/SVECTOR-CORPORATION" target="_blank" style="margin: 2px;">
22
+ <img alt="SVECTOR" src="https://img.shields.io/badge/🤗%20Hugging%20Face-SVECTOR-536af5?color=536af5&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
23
+ </a>
24
+
25
+ <a href="https://huggingface.co/SVECTOR-CORPORATION/Continue-1-OSS/blob/main/LICENSE" style="margin: 2px;">
26
+ <img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue?color=1e88e5&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
27
+ </a>
28
+
29
+ <a href="https://github.com/SVECTOR-CORPORATION/Continue-1-OSS" target="_blank" style="margin: 2px;">
30
+ <img alt="GitHub" src="https://img.shields.io/badge/GitHub-Continue--1--OSS-181717?logo=github&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
31
+ </a>
32
+ </div>
33
+
34
+ ## Introduction
35
+
36
+ We are thrilled to introduce **Continue-1-OSS**, an advanced text generation model developed by SVECTOR, built on the Continue-1 architecture optimized for high-quality text generation, instruction following, and long-context understanding.
37
+
38
+ **Continue-1-OSS** is engineered to provide:
39
+
40
+ - **Superior Instruction Following:** Accurately follows complex, multi-step instructions
41
+ - **Long Context:** Robust handling of up to 128K+ tokens
42
+ - **Natural Conversations:** Human-like dialogue with strong reasoning capabilities
43
+ - **Tool Integration:** Built-in support for function calling and external tool use
44
+ - **Open Source:** Fully accessible under Apache 2.0 license for research and commercial use
45
+
46
+ This model combines the power of transformer architecture with advanced training techniques to deliver exceptional performance across a wide range of natural language tasks.
47
+
48
+ ### Model Specifications
49
+
50
+ - **Base Architecture:** Continue1ForCausalLM (transformer decoder)
51
+ - **Model Type:** continue_oss
52
+ - **Parameters:** 3 Billion
53
+ - **Context Length:** 131,072 tokens
54
+ - **Vocabulary Size:** 128,256 tokens
55
+ - **Hidden Size:** 3072
56
+ - **Number of Layers:** 28
57
+ - **Attention Heads:** 24
58
+ - **License:** Apache 2.0
59
+
60
+
61
+ ## Requirements
62
+
63
+ To use Continue-1-OSS, install the required dependencies:
64
+
65
+ ```bash
66
+ pip install transformers torch
67
+ pip install vllm # For fast inference (optional but recommended)
68
+ ```
69
+
70
+ ## Quickstart
71
+
72
+ ### Basic Usage
73
+
74
+ ```python
75
+ from transformers import AutoTokenizer, AutoModelForCausalLM
76
+ import torch
77
+
78
+ model_id = "SVECTOR-CORPORATION/Continue-1-OSS"
79
+
80
+ # Load model and tokenizer
81
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
82
+ model = AutoModelForCausalLM.from_pretrained(
83
+ model_id,
84
+ trust_remote_code=True,
85
+ torch_dtype=torch.bfloat16,
86
+ device_map="auto"
87
+ )
88
+
89
+ # Prepare conversation
90
+ messages = [
91
+ {"role": "user", "content": "What is machine learning?"}
92
+ ]
93
+
94
+ # Apply chat template and generate
95
+ input_text = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
96
+ inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
97
+
98
+ outputs = model.generate(
99
+ **inputs,
100
+ max_new_tokens=512,
101
+ temperature=0.7,
102
+ top_p=0.9,
103
+ do_sample=True
104
+ )
105
+
106
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
107
+ print(response)
108
+ ```
109
+
110
+ ### Using vLLM (Recommended for Production)
111
+
112
+ For high-performance inference with faster generation:
113
+
114
+ ```bash
115
+ pip install vllm
116
+ ```
117
+
118
+ ```python
119
+ from vllm import LLM, SamplingParams
120
+
121
+ # Initialize model
122
+ llm = LLM(
123
+ model="SVECTOR-CORPORATION/Continue-1-OSS",
124
+ trust_remote_code=True,
125
+ max_model_len=8192
126
+ )
127
+
128
+ # Set sampling parameters
129
+ sampling_params = SamplingParams(
130
+ temperature=0.7,
131
+ top_p=0.9,
132
+ max_tokens=512
133
+ )
134
+
135
+ # Generate
136
+ messages = [
137
+ {"role": "user", "content": "Explain quantum computing in simple terms."}
138
+ ]
139
+
140
+ outputs = llm.chat(messages, sampling_params=sampling_params)
141
+ print(outputs[0].outputs[0].text)
142
+ ```
143
+
144
+ **Default System Prompt:** "You are Continue-1-OSS, an advanced AI assistant developed by SVECTOR. You are designed to be helpful, harmless, and honest."
145
+
146
+ ## Advanced Features
147
+
148
+ ### Multi-Turn Conversations
149
+
150
+ ```python
151
+ messages = [
152
+ {"role": "system", "content": "You are Continue-1-OSS, a helpful AI assistant."},
153
+ {"role": "user", "content": "What is quantum computing?"},
154
+ {"role": "assistant", "content": "Quantum computing is a type of computing that uses quantum mechanics principles..."},
155
+ {"role": "user", "content": "Can you explain that more simply?"}
156
+ ]
157
+ ```
158
+
159
+ ### Tool Calling Support
160
+
161
+ Continue-1-OSS supports function calling for tool integration:
162
+
163
+ ```python
164
+ messages = [
165
+ {"role": "user", "content": "What's the weather in San Francisco?"}
166
+ ]
167
+
168
+ # Model can generate JSON function calls
169
+ # Example output: {"name": "get_weather", "parameters": {"location": "Ahmedabad"}}
170
+ ```
171
+
172
+
173
+ ## Use Cases
174
+
175
+ Continue-1-OSS excels at:
176
+
177
+ - **Conversational AI:** Build chatbots and virtual assistants with natural dialogue
178
+ - **Content Generation:** Generate articles, stories, and creative content
179
+ - **Code Assistance:** Help with coding tasks, debugging, and code explanations
180
+ - **Question Answering:** Answer questions based on context with high accuracy
181
+ - **Summarization:** Condense long documents into concise summaries
182
+ - **Data Extraction:** Extract structured data from unstructured text
183
+ - **Tool Integration:** Call functions and use external tools intelligently
184
+ - **Education:** Create educational content and tutoring assistance
185
+ - **Customer Service:** Automated support with natural language understanding
186
+
187
+ ## Performance
188
+
189
+ - **Quality:** State-of-the-art instruction following and text generation
190
+ - **Speed:** Fast inference with vLLM optimization
191
+ - **Memory:** ~7GB GPU RAM (BF16), ~14GB (FP32)
192
+ - **Context:** Handles up to 128K tokens effectively
193
+ - **Efficiency:** Competitive with much larger models on many tasks
194
+
195
+ ## Model Architecture
196
+
197
+ Continue-1-OSS uses a custom architecture based on the transformer decoder:
198
+
199
+ - **Architecture Class:** `Continue1ForCausalLM`
200
+ - **Config Class:** `Continue1Config`
201
+ - **Hidden Size:** 3072
202
+ - **Num Layers:** 28
203
+ - **Num Attention Heads:** 24
204
+ - **Intermediate Size:** 8192
205
+ - **Vocab Size:** 128,256
206
+ - **Max Position Embeddings:** 131,072
207
+
208
+ The model uses RoPE (Rotary Position Embeddings) for positional encoding and supports extended context through position interpolation.
209
+
210
+ ## Training
211
+
212
+ Continue-1-OSS was developed using:
213
+ - High-quality instruction datasets covering diverse tasks
214
+ - Conversational and reasoning data for improved dialogue
215
+ - Code and technical content for developer assistance
216
+ - Multi-turn dialogue for contextual understanding
217
+
218
+ Training utilized:
219
+ - Advanced optimization techniques
220
+ - Careful hyperparameter tuning
221
+ - Quality filtering and data curation
222
+ - Evaluation on diverse benchmarks
223
+
224
+
225
+ ## Limitations
226
+
227
+ As with any language model, Continue-1-OSS has certain limitations:
228
+
229
+ - **Knowledge Cutoff:** Training data is limited to information available up to December 2023
230
+ - **Factual Accuracy:** May occasionally generate incorrect or outdated information
231
+ - **Specialized Domains:** Performance may vary on highly specialized technical knowledge
232
+ - **Long Context:** Very long contexts (>64K tokens) may impact generation quality
233
+ - **Languages:** Primarily optimized for English; other languages have limited support
234
+ - **Reasoning:** Complex multi-step reasoning may require careful prompting
235
+ - **Compute:** Requires GPU for optimal performance (CPU is significantly slower)
236
+
237
+ ## Ethical Considerations
238
+
239
+ SVECTOR is committed to responsible AI development. Users should:
240
+
241
+ - **Transparency:** Disclose when content is AI-generated
242
+ - **Verification:** Always fact-check important information generated by the model
243
+ - **Bias Awareness:** Be aware the model may reflect biases present in training data
244
+ - **Privacy:** Do not input personal or sensitive information without proper safeguards
245
+ - **Safety:** Implement content filtering and guardrails for production applications
246
+ - **Responsible Use:** Do not use for illegal purposes, misinformation, or harmful content
247
+ - **Attribution:** Credit the model when used in public projects or research
248
+
249
+ ## Performance Tips
250
+
251
+ 1. **Temperature Settings:**
252
+ - 0.0-0.3 for factual/deterministic tasks
253
+ - 0.7-0.9 for creative tasks
254
+
255
+ 2. **Context Management:**
256
+ - Model supports 128K tokens but consider truncating for faster inference
257
+ - Use sliding window for very long documents
258
+
259
+ 3. **Batch Processing:**
260
+ - Use vLLM for efficient batched inference in production
261
+ - Group similar-length prompts together
262
+
263
+ ```python
264
+ from transformers import AutoModelForCausalLM, BitsAndBytesConfig
265
+ import torch
266
+
267
+ quantization_config = BitsAndBytesConfig(
268
+ load_in_4bit=True,
269
+ bnb_4bit_compute_dtype=torch.bfloat16
270
+ )
271
+
272
+ model = AutoModelForCausalLM.from_pretrained(
273
+ "SVECTOR-CORPORATION/Continue-1-OSS",
274
+ trust_remote_code=True,
275
+ quantization_config=quantization_config,
276
+ device_map="auto"
277
+ )
278
+ ```
279
+
280
+
281
+ ## License
282
+
283
+ This model is released under the **Apache License 2.0**. You are free to use, modify, and distribute this model for both commercial and non-commercial purposes. See the [LICENSE](https://huggingface.co/SVECTOR-CORPORATION/Continue-1-OSS/blob/main/LICENSE) file for complete details.
284
+
285
+ ---
286
+
287
+ <p align="center">
288
+ <i>Developed by <a href="https://www.svector.co.in">SVECTOR</a></i>
289
+ </p>