Instructions to use themathys/mistralai-Code-Instruct-Finetune-test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use themathys/mistralai-Code-Instruct-Finetune-test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="themathys/mistralai-Code-Instruct-Finetune-test") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("themathys/mistralai-Code-Instruct-Finetune-test") model = AutoModelForCausalLM.from_pretrained("themathys/mistralai-Code-Instruct-Finetune-test") 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 Settings
- vLLM
How to use themathys/mistralai-Code-Instruct-Finetune-test with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "themathys/mistralai-Code-Instruct-Finetune-test" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "themathys/mistralai-Code-Instruct-Finetune-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/themathys/mistralai-Code-Instruct-Finetune-test
- SGLang
How to use themathys/mistralai-Code-Instruct-Finetune-test 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 "themathys/mistralai-Code-Instruct-Finetune-test" \ --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": "themathys/mistralai-Code-Instruct-Finetune-test", "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 "themathys/mistralai-Code-Instruct-Finetune-test" \ --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": "themathys/mistralai-Code-Instruct-Finetune-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use themathys/mistralai-Code-Instruct-Finetune-test with Docker Model Runner:
docker model run hf.co/themathys/mistralai-Code-Instruct-Finetune-test
Upload MistralForCausalLM
Browse files
model-00001-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4798371448
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5da011b4074410d5e153d22abf5553faf6905c4c7f8c39fa87857e2d268ad145
|
| 3 |
size 4798371448
|
model-00002-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4831925544
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5f61e676bdb824e1c3985194e7d58b4f2be65e442488d42dd2dac9cbb6a80a4b
|
| 3 |
size 4831925544
|
model-00003-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999714832
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0bdd801d3120045d06dedabf287e05df8f05195388913df499861199eb64c198
|
| 3 |
size 4999714832
|
model-00004-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999714832
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aa8af0198e09bbe12da9c2c10d13d1690871e2802d5fa4ea1c7c8fc7ab47693f
|
| 3 |
size 4999714832
|
model-00005-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4831925592
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad79cdcc6ab7a6822e2525e59d415bcca5c58e38cf183f471f2ed97c60bcd87a
|
| 3 |
size 4831925592
|
model-00006-of-00006.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3993072240
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c01f58f395dce9b8394c7715dfb79d84b50e1a7529b26acbf80f02ebe2cfdc78
|
| 3 |
size 3993072240
|