Text Generation
Transformers
Safetensors
mistral
code-llm
mistral-7b
language-model
text-generation-inference
Instructions to use Villian7/01Coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Villian7/01Coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Villian7/01Coder")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Villian7/01Coder") model = AutoModelForCausalLM.from_pretrained("Villian7/01Coder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Villian7/01Coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Villian7/01Coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Villian7/01Coder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Villian7/01Coder
- SGLang
How to use Villian7/01Coder 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 "Villian7/01Coder" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Villian7/01Coder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Villian7/01Coder" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Villian7/01Coder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Villian7/01Coder with Docker Model Runner:
docker model run hf.co/Villian7/01Coder
File size: 2,369 Bytes
00b4271 da5cc20 00b4271 da5cc20 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ---
# For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1
# Doc / guide: https://huggingface.co/docs/hub/model-cards
tags:
- code-llm
- mistral-7b
- language-model
---
# Model Card for 01Coder 7B
This model card provides details about a code language model (LLM) based on Mistral 7B architecture. It has been trained on a combination of three datasets: ise-uiuc/Magicoder-OSS-Instruct-75K, HuggingFaceH4/CodeAlpaca_20K, and theblackcat102/evol-codealpaca-v1.
## Model Details
### Model Description
This model is a language model fine-tuned for code generation tasks, leveraging the Mistral 7B base model architecture. It has been trained on a combination of three datasets, namely Magicoder-OSS-Instruct-75K, CodeAlpaca_20K, and evol-codealpaca-v1. The model aims to assist developers in generating code snippets for various programming tasks, ranging from natural language instructions to specific coding prompts.
- **Developed by:** Manoj Athreya A
- **Model type:** Language model (LLM)
- **License:** [Apache 2.0 License]
- **Finetuned from model:** Mistral 7B
## Intended Uses
- Code generation from natural language prompts.
- Assisting developers in completing code snippets.
- Augmenting code-related tasks with automated generation capabilities.
## Limitations and Ethical Considerations
- **Bias:** As with any language model, biases present in the training data may manifest in the generated code snippets.
- **Accuracy:** While the model aims to generate accurate code, it may occasionally produce incorrect or suboptimal solutions, especially for complex tasks.
- **Security:** Generated code should be reviewed for security vulnerabilities, as the model may inadvertently produce insecure implementations.
- **Ethical Use:** Users are encouraged to employ the model responsibly and ethically, avoiding harmful or malicious use cases.
### Recommendations
- Fine-tuning the model on specific domains or tasks may improve its performance.
- Validate generated code in real-world scenarios to ensure its correctness and reliability.
- Provide feedback to continuously improve the model's performance and address any issues encountered during usage.
## License
- The source code in this repo is licensed under the Apache 2.0 license.
## Version History
- 01-Coder-7Bv0.1
|