Text Generation
Transformers
Safetensors
llama
Generated from Trainer
open-r1
trl
grpo
conversational
text-generation-inference
Instructions to use zzzzit/coderm-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zzzzit/coderm-8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zzzzit/coderm-8b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zzzzit/coderm-8b") model = AutoModelForCausalLM.from_pretrained("zzzzit/coderm-8b") 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 zzzzit/coderm-8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zzzzit/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": "zzzzit/coderm-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zzzzit/coderm-8b
- SGLang
How to use zzzzit/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 "zzzzit/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": "zzzzit/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 "zzzzit/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": "zzzzit/coderm-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zzzzit/coderm-8b with Docker Model Runner:
docker model run hf.co/zzzzit/coderm-8b
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.5714285714285714, | |
| "eval_steps": 500, | |
| "global_step": 1, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": -3.0, | |
| "completions/max_length": 602.0, | |
| "completions/max_terminated_length": 602.0, | |
| "completions/mean_length": 419.15625, | |
| "completions/mean_terminated_length": 419.15625, | |
| "completions/min_length": 225.0, | |
| "completions/min_terminated_length": 225.0, | |
| "epoch": 0.5714285714285714, | |
| "frac_reward_zero_std": 0.53125, | |
| "grad_norm": 0.02846240997314453, | |
| "kl": 0.0002314150333404541, | |
| "learning_rate": 0.0, | |
| "loss": 0.0, | |
| "num_tokens": 59828.0, | |
| "reward": 2.78125, | |
| "reward_std": 0.5303300619125366, | |
| "rewards/format_reward/mean": 0.0, | |
| "rewards/format_reward/std": 0.0, | |
| "rewards/unittest_reward/mean": 2.78125, | |
| "rewards/unittest_reward/std": 2.339914321899414, | |
| "step": 1 | |
| }, | |
| { | |
| "epoch": 0.5714285714285714, | |
| "step": 1, | |
| "total_flos": 0.0, | |
| "train_loss": 9.257459169020876e-06, | |
| "train_runtime": 152.6909, | |
| "train_samples_per_second": 0.36, | |
| "train_steps_per_second": 0.013 | |
| } | |
| ], | |
| "logging_steps": 1, | |
| "max_steps": 2, | |
| "num_input_tokens_seen": 59828, | |
| "num_train_epochs": 1, | |
| "save_steps": 50, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": false, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 0.0, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |