Text Generation
Transformers
Safetensors
English
llama
code
conversational
text-generation-inference
Instructions to use KAKA22/CodeRM-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KAKA22/CodeRM-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KAKA22/CodeRM-8B") 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("KAKA22/CodeRM-8B") model = AutoModelForCausalLM.from_pretrained("KAKA22/CodeRM-8B", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KAKA22/CodeRM-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KAKA22/CodeRM-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KAKA22/CodeRM-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KAKA22/CodeRM-8B
- SGLang
How to use KAKA22/CodeRM-8B 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 "KAKA22/CodeRM-8B" \ --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": "KAKA22/CodeRM-8B", "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 "KAKA22/CodeRM-8B" \ --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": "KAKA22/CodeRM-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KAKA22/CodeRM-8B with Docker Model Runner:
docker model run hf.co/KAKA22/CodeRM-8B
Commit History
-
Add library name, link to code
Verified signatureThis PR adds the `library_name` to the model card, making it easier to use. It also adds a link to the Github repository.9b4d3bc
-
Update README.md
Verified signaturedd9b7c5 -
Update README.md
Verified signature9dc8592 -
Update README.md
Verified signatured11053e -
Update README.md
Verified signature3511ed5
-
Update README.md
Verified signature1c3e7c4
-
Update README.md
Verified signature2767715 -
Update README.md
Verified signature9c39e4f
-
Update README.md
Verified signatureb91222a -
Update README.md
Verified signature23fa8d6 -
Update README.md
Verified signature18640c6 -
Update README.md
Verified signaturee066062
-
Upload model-00003-of-00004.safetensors with huggingface_hub
Verified signature38ddeab -
Upload model-00002-of-00004.safetensors with huggingface_hub
Verified signature71ebf75 -
Upload model-00004-of-00004.safetensors with huggingface_hub
Verified signature23eee87 -
Upload model-00001-of-00004.safetensors with huggingface_hub
Verified signatureb29061a -
Upload trainer_state.json with huggingface_hub
Verified signature8266f30 -
Upload generation_config.json with huggingface_hub
Verified signaturec9d35b3 -
Upload training_args.bin with huggingface_hub
Verified signature335489f -
Upload special_tokens_map.json with huggingface_hub
Verified signature8074314 -
Upload tokenizer_config.json with huggingface_hub
Verified signature6cb5dda -
Upload config.json with huggingface_hub
Verified signaturecd2d461 -
Upload model.safetensors.index.json with huggingface_hub
Verified signature0ab402c -
Upload tokenizer.json with huggingface_hub
Verified signature2ba5e7d -
initial commit
Verified signaturec1b855c