Instructions to use TroyDoesAI/Codestral-RAG-19B-Pruned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TroyDoesAI/Codestral-RAG-19B-Pruned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TroyDoesAI/Codestral-RAG-19B-Pruned")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TroyDoesAI/Codestral-RAG-19B-Pruned") model = AutoModelForCausalLM.from_pretrained("TroyDoesAI/Codestral-RAG-19B-Pruned") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use TroyDoesAI/Codestral-RAG-19B-Pruned with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TroyDoesAI/Codestral-RAG-19B-Pruned" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TroyDoesAI/Codestral-RAG-19B-Pruned", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TroyDoesAI/Codestral-RAG-19B-Pruned
- SGLang
How to use TroyDoesAI/Codestral-RAG-19B-Pruned 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 "TroyDoesAI/Codestral-RAG-19B-Pruned" \ --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": "TroyDoesAI/Codestral-RAG-19B-Pruned", "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 "TroyDoesAI/Codestral-RAG-19B-Pruned" \ --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": "TroyDoesAI/Codestral-RAG-19B-Pruned", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TroyDoesAI/Codestral-RAG-19B-Pruned with Docker Model Runner:
docker model run hf.co/TroyDoesAI/Codestral-RAG-19B-Pruned
Quant with imatrix?
I've attempted to add imatrix and quant it to q5_K_M, I'm having a few issues at the moment with my machine so I'm just testing a direct conversion to q8_0 ,
do you think imatrix might make up for the loss at lower vram usages?
please get in touch, love your work
Hey, Sorry to get back so late, I havent really played with Quantization with imatrix so you are more of an expert in that department.
=)
I try to prune my models to keep the full precision and fit under 24 GB.
Thank you for your kind words, I wish I could help, maybe message someone that releases imatrix.
I am very interested in how a pruned model performs after being quantized as I feel I removed many redundant layers that might have been what makes quantized models perform ok. Please stay in touch. I am very curious and want to learn more! :D
Reach out to me:
https://www.linkedin.com/in/troyandrewschultz/