Instructions to use ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ") model = AutoModelForCausalLM.from_pretrained("ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ
- SGLang
How to use ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ 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 "ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ" \ --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": "ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ", "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 "ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ" \ --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": "ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ with Docker Model Runner:
docker model run hf.co/ArthurGprog/Codestral-22B-v0.1-FIM-Fix-GPTQ
This model is a GPTQ-quantized version of the Codestral-22B-v0.1 model with the FIM fix, designed to provide improved performance and efficiency. The original Codestral-22B-v0.1 model had a tokenization error for the FIM use case, which was addressed by the legraphista/Codestral-22B-v0.1-hf-FIM-fix model. This GPTQ-quantized model builds upon the fixed model, using default AutoGPTQ arguments and 4 bits per weight.
Compatible with vllm
Alternative to dan-kwiat/Codestral-22B-v0.1-hf-FIM-fix-awq
Tips for Code Completion
When using this model or any other Codestral-22B-v0.1 model for code completion in VSCode on Windows, make sure to use LF (Line Feed) instead of CRLF (Carriage Return Line Feed) for better results. This will prevent unrelated '\' characters from appearing in completions.
- Downloads last month
- 1