Text Generation
Transformers
Safetensors
llama
code
text
agent
conversational
text-generation-inference
Instructions to use SVECTOR-CORPORATION/dotcode-1-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SVECTOR-CORPORATION/dotcode-1-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SVECTOR-CORPORATION/dotcode-1-mini") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SVECTOR-CORPORATION/dotcode-1-mini") model = AutoModelForCausalLM.from_pretrained("SVECTOR-CORPORATION/dotcode-1-mini") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use SVECTOR-CORPORATION/dotcode-1-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SVECTOR-CORPORATION/dotcode-1-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SVECTOR-CORPORATION/dotcode-1-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SVECTOR-CORPORATION/dotcode-1-mini
- SGLang
How to use SVECTOR-CORPORATION/dotcode-1-mini with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "SVECTOR-CORPORATION/dotcode-1-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SVECTOR-CORPORATION/dotcode-1-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "SVECTOR-CORPORATION/dotcode-1-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SVECTOR-CORPORATION/dotcode-1-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SVECTOR-CORPORATION/dotcode-1-mini with Docker Model Runner:
docker model run hf.co/SVECTOR-CORPORATION/dotcode-1-mini
| license: apache-2.0 | |
| pipeline_tag: text-generation | |
| library_name: transformers | |
| tags: | |
| - code | |
| - text-generation | |
| - text | |
| - agent | |
| <p align="center"> | |
| <img alt="dotcode-1-mini" src="https://github.com/SVECTOR-CORPORATION/dotcode-1-mini-oss/blob/main/dotcode-1-mini-8b.jpg?raw=true"> | |
| </p> | |
| # .dotcode-1-mini | |
| <div align="left" style="line-height: 1;"> | |
| <a href="https://spec-chat.tech" target="_blank" style="margin: 2px;"> | |
| <img alt="SVECTOR Corporation" src="https://img.shields.io/badge/💬%20Spec%20Chat-Spec%20Chat-blue?style=plastic" style="display: inline-block; vertical-align: middle;"/> | |
| </a> | |
| <a href="https://huggingface.co/SVECTOR-CORPORATION" target="_blank" style="margin: 2px;"> | |
| <img alt="SVECTOR Corporation" src="https://img.shields.io/badge/🤗%20Hugging%20Face-SVECTOR%20Corporation-536af5?color=536af5&logoColor=white" style="display: inline-block; vertical-align: middle;"/> | |
| </a> | |
| <a href="https://huggingface.co/SVECTOR-CORPORATION/dotcode-1-mini/blob/main/LICENSE" style="margin: 2px;"> | |
| <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;"/> | |
| </a> | |
| </div> | |
| ## Introduction | |
| We are excited to present **.dotcode-1-mini**, a compact and efficient language model developed by SVECTOR. This model represents our commitment to building accessible, high-performance AI solutions that empower developers and researchers. | |
| **.dotcode-1-mini** is designed to deliver: | |
| - **Efficiency:** Optimized architecture for fast inference and reduced computational requirements | |
| - **Versatility:** Strong performance across diverse text generation and code-related tasks | |
| - **Accessibility:** Open-source model available to the community under Apache 2.0 license | |
| Balanced approach to capability and resource efficiency. | |
| ### Model Specifications | |
| - **Type:** Causal language model (LLaMA-based architecture) | |
| - **License:** Apache 2.0 | |
| - **Context Length:** 32K | |
| ## Requirements | |
| To use .dotcode-1-mini, ensure you have the latest versions of `transformers` and `accelerate` installed: | |
| ```bash | |
| pip install -U transformers accelerate | |
| ``` | |
| ## Quickstart | |
| Here's a simple example demonstrating how to load and use the model: | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| import torch | |
| model_id = "SVECTOR-CORPORATION/dotcode-1-mini" | |
| tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_id, | |
| torch_dtype=torch.bfloat16, | |
| device_map="auto", | |
| trust_remote_code=True | |
| ) | |
| # Example prompt | |
| prompt = "Write a Python function to calculate fibonacci numbers:" | |
| inputs = tokenizer(prompt, return_tensors="pt").to(model.device) | |
| outputs = model.generate( | |
| **inputs, | |
| max_new_tokens=512, | |
| temperature=0.7, | |
| top_p=0.9, | |
| do_sample=True | |
| ) | |
| response = tokenizer.decode(outputs[0], skip_special_tokens=True) | |
| print(response) | |
| ``` | |
| ## Use Cases | |
| .dotcode-1-mini excels at various tasks including: | |
| - **Code Generation:** Writing functions, scripts, and complete programs | |
| - **Text Completion:** Intelligent continuation of text and code | |
| - **Problem Solving:** Logical reasoning and algorithmic thinking | |
| - **Documentation:** Generating comments, docstrings, and technical explanations | |
| - **General Text Generation:** Creative writing, summaries, and content creation | |
| ## Performance | |
| .dotcode-1-mini has been designed to provide strong performance while maintaining a compact model size. Detailed benchmarks and evaluation results will be shared as they become available. | |
| ## Model Architecture | |
| Built on the LLaMA architecture, .dotcode-1-mini incorporates optimizations specifically tailored for: | |
| - Efficient token processing | |
| - Reduced memory footprint | |
| - Fast inference speeds | |
| - Balanced precision and performance | |
| ## Training | |
| .dotcode-1-mini was trained on a diverse corpus including: | |
| - High-quality code repositories | |
| - Technical documentation | |
| - General text data | |
| - Curated datasets for improved reasoning | |
| *Detailed training methodology and data composition will be documented in future releases.* | |
| ## Limitations | |
| As with any language model, .dotcode-1-mini has certain limitations: | |
| - May generate incorrect or outdated information | |
| - Performance varies based on prompt quality and task complexity | |
| - Not specifically fine-tuned for specialized domains without additional training | |
| - Should be used with appropriate safeguards in production environments | |
| ## Ethical Considerations | |
| SVECTOR is committed to responsible AI development. Users should: | |
| - Review outputs for accuracy and appropriateness | |
| - Implement content filtering for sensitive applications | |
| - Avoid using the model for harmful or malicious purposes | |
| - Respect copyright and intellectual property when generating code | |
| ## License | |
| This model is released under the Apache License 2.0. See the [LICENSE](https://huggingface.co/SVECTOR-CORPORATION/dotcode-1-mini/blob/main/LICENSE) file for complete details. | |
| --- | |
| <p align="center"> | |
| <i>Developed by <a href="https://www.svector.co.in"> SVECTOR </a></i> | |
| </p> |