Instructions to use aiXcoder/aixcoder-7b-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aiXcoder/aixcoder-7b-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aiXcoder/aixcoder-7b-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aiXcoder/aixcoder-7b-base") model = AutoModelForCausalLM.from_pretrained("aiXcoder/aixcoder-7b-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aiXcoder/aixcoder-7b-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aiXcoder/aixcoder-7b-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aiXcoder/aixcoder-7b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aiXcoder/aixcoder-7b-base
- SGLang
How to use aiXcoder/aixcoder-7b-base 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 "aiXcoder/aixcoder-7b-base" \ --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": "aiXcoder/aixcoder-7b-base", "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 "aiXcoder/aixcoder-7b-base" \ --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": "aiXcoder/aixcoder-7b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aiXcoder/aixcoder-7b-base with Docker Model Runner:
docker model run hf.co/aiXcoder/aixcoder-7b-base
Commit History
-
Adding `safetensors` variant of this model (#3)
Verified signature- Adding `safetensors` variant of this model (76be5adce67a6a5ee39b5d201eec578302d951c1) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>e98b7ec
-
Upload MODEL_LICENSE with huggingface_hub
Verified signature821a45a -
Upload README.md with huggingface_hub
Verified signature580f67f
-
Upload tokenizer.json
Verified signature5b83edc -
[WIP] Upload folder using huggingface_hub (multi-commit 3082c637f9ee0310b18616ab2a158d7692a89f5c6fcaa0d8f5d749df8a5159de) (#2)
Verified signature- 4b29df4ac1840bf4d740d7b74c9a3a75aa89d3bb6e3f1a8756f197e5a7b1af57 (887a6319526bd2fa98c90781a83cfee387f61548) - bb1a0c87358ceea1be7c8e97cf1d820ccfd4540b3749ce368e9646155bdf8a46 (081375a9f9e5f9ebdbaa58050fadabfb04a11862)f35b37b -
[WIP] Upload folder using huggingface_hub (multi-commit 23c3b126392656451c88d23bbf028d0c632b4c216b35cc96e75d0c0ab9f01d01) (#1)
Verified signature- 4b29df4ac1840bf4d740d7b74c9a3a75aa89d3bb6e3f1a8756f197e5a7b1af57 (5d2acfef07c6f11de3a3917c66be457cfaf65d09) - bb1a0c87358ceea1be7c8e97cf1d820ccfd4540b3749ce368e9646155bdf8a46 (ae53d42fdbb1f2ed2854a11a1767d2fef139e6df)ed591b9 -
Upload tokenizer_config.json with huggingface_hub
Verified signature91670f3 -
Upload tokenizer.model with huggingface_hub
Verified signature44784ac -
Upload special_tokens_map.json with huggingface_hub
Verified signature726660d -
Upload pytorch_model.bin.index.json with huggingface_hub
Verified signatured92a5db -
Upload generation_config.json with huggingface_hub
Verified signature6719e07 -
Upload config.json with huggingface_hub
Verified signature6892bb4 -
initial commit
Verified signaturec1c2a17