Instructions to use NTQAI/Nxcode-CQ-7B-orpo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NTQAI/Nxcode-CQ-7B-orpo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NTQAI/Nxcode-CQ-7B-orpo") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NTQAI/Nxcode-CQ-7B-orpo") model = AutoModelForCausalLM.from_pretrained("NTQAI/Nxcode-CQ-7B-orpo", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NTQAI/Nxcode-CQ-7B-orpo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NTQAI/Nxcode-CQ-7B-orpo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NTQAI/Nxcode-CQ-7B-orpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NTQAI/Nxcode-CQ-7B-orpo
- SGLang
How to use NTQAI/Nxcode-CQ-7B-orpo 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 "NTQAI/Nxcode-CQ-7B-orpo" \ --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": "NTQAI/Nxcode-CQ-7B-orpo", "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 "NTQAI/Nxcode-CQ-7B-orpo" \ --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": "NTQAI/Nxcode-CQ-7B-orpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NTQAI/Nxcode-CQ-7B-orpo with Docker Model Runner:
docker model run hf.co/NTQAI/Nxcode-CQ-7B-orpo
Commit History
-
Update README.md
Verified signature74f3b3c
-
Update README.md
Verified signature47a1b53 -
Update README.md
Verified signature5a1c4a7 -
Update README.md
Verified signaturebbbf953
-
Update README.md
Verified signature0cdf8a6 -
Update README.md
Verified signaturea95b3c8 -
Update README.md
Verified signaturef45b9e7 -
Update README.md
Verified signatured955c16 -
Update README.md
Verified signature09f015f -
Update README.md
Verified signature0f4b1a7 -
Update README.md
Verified signaturecf9124d
-
Update README.md
Verified signature72ac613 -
Update README.md
Verified signature5b191c2 -
Upload tokenizer_config.json
Verified signatureb59e637 -
Delete tokenizer_config.json
Verified signature38a0db7 -
Upload 3 files
Verified signature0c2d44d -
Delete special_tokens_map.json
Verified signature78e9043 -
Delete model.safetensors.index.json
Verified signature4da7a11 -
Delete generation_config.json
Verified signature6eea8b4 -
Upload tokenizer_config.json
Verified signature3ddac67 -
Delete tokenizer_config.json
Verified signature1e83f6e -
Upload tokenizer.model
Verified signaturee4a75da -
Update README.md
Verified signature199602f
-
Update README.md
Verified signature9e0cea1
-
Update README.md
Verified signature639f1ac -
Update README.md
Verified signature272ac5b -
Upload config.json
Verified signatured7f6888 -
Delete config.json
Verified signatureefdb514 -
Upload tokenizer.json
Verified signatureb94f6d7 -
Delete tokenizer.json
Verified signature5cc3ffe -
Update README.md
Verified signaturea5a9f61
-
Update README.md
Verified signatureb7222bc -
Update README.md
Verified signature766baf7 -
Update README.md
Verified signature2ca26d3 -
Update README.md
Verified signature0c7484a -
Update README.md
Verified signature6fa28c3 -
Update README.md
Verified signature01aa790 -
Update README.md
Verified signature7c76c25 -
Update README.md
Verified signaturef36bb6f -
Update README.md
Verified signature15165fa -
Update README.md
Verified signature612e826 -
Update README.md
Verified signaturee279f01 -
Update README.md
Verified signature1a61029 -
Update README.md
Verified signature1e326ab -
Update README.md
Verified signaturea87bede -
Create README.md
Verified signature69bb499
-
upload model
hoang.dang16d0c0e4 -
initial commit
Verified signature2543b5b