Instructions to use SepKeyPro/PyomoCodeQwen1.5-7B-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SepKeyPro/PyomoCodeQwen1.5-7B-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SepKeyPro/PyomoCodeQwen1.5-7B-Chat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SepKeyPro/PyomoCodeQwen1.5-7B-Chat") model = AutoModelForCausalLM.from_pretrained("SepKeyPro/PyomoCodeQwen1.5-7B-Chat") 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 SepKeyPro/PyomoCodeQwen1.5-7B-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SepKeyPro/PyomoCodeQwen1.5-7B-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SepKeyPro/PyomoCodeQwen1.5-7B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SepKeyPro/PyomoCodeQwen1.5-7B-Chat
- SGLang
How to use SepKeyPro/PyomoCodeQwen1.5-7B-Chat 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 "SepKeyPro/PyomoCodeQwen1.5-7B-Chat" \ --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": "SepKeyPro/PyomoCodeQwen1.5-7B-Chat", "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 "SepKeyPro/PyomoCodeQwen1.5-7B-Chat" \ --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": "SepKeyPro/PyomoCodeQwen1.5-7B-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SepKeyPro/PyomoCodeQwen1.5-7B-Chat with Docker Model Runner:
docker model run hf.co/SepKeyPro/PyomoCodeQwen1.5-7B-Chat
Upload folder using huggingface_hub
Browse files- README.md +1 -1
- adapter_config.json +3 -3
- adapter_model.safetensors +1 -1
- model-00001-of-00003.safetensors +1 -1
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +1 -1
README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
---
|
| 2 |
{}
|
| 3 |
---
|
| 4 |
-
CodeQwen1.5-7B-Chat
|
|
|
|
| 1 |
---
|
| 2 |
{}
|
| 3 |
---
|
| 4 |
+
CodeQwen1.5-7B-Chat fine-tuned on Pyomo200 QLoRA
|
adapter_config.json
CHANGED
|
@@ -21,12 +21,12 @@
|
|
| 21 |
"revision": null,
|
| 22 |
"target_modules": [
|
| 23 |
"o_proj",
|
|
|
|
|
|
|
| 24 |
"v_proj",
|
| 25 |
-
"k_proj",
|
| 26 |
"gate_proj",
|
| 27 |
-
"q_proj",
|
| 28 |
"down_proj",
|
| 29 |
-
"
|
| 30 |
],
|
| 31 |
"task_type": "CAUSAL_LM",
|
| 32 |
"use_dora": false,
|
|
|
|
| 21 |
"revision": null,
|
| 22 |
"target_modules": [
|
| 23 |
"o_proj",
|
| 24 |
+
"up_proj",
|
| 25 |
+
"q_proj",
|
| 26 |
"v_proj",
|
|
|
|
| 27 |
"gate_proj",
|
|
|
|
| 28 |
"down_proj",
|
| 29 |
+
"k_proj"
|
| 30 |
],
|
| 31 |
"task_type": "CAUSAL_LM",
|
| 32 |
"use_dora": false,
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 160229968
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4ab8f994bc28ffeba1d7b8b0c897d51219fb6b233d1c4e3edb8e1197baed112f
|
| 3 |
size 160229968
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4890849432
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87ca052f81fbcfb4b652edfcc19eba5d1f524be68ff91179b0ac81c3d533e2b2
|
| 3 |
size 4890849432
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4980023424
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9cfa8a8d94db5767151eb76f5d3006367764dd30c899cb0b0a7d7d8d0f9bb259
|
| 3 |
size 4980023424
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4629740208
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e3336049519f67972c8a73c356ab361241ad3f1dccc3e943e6ab9f6de2cc497e
|
| 3 |
size 4629740208
|