Instructions to use KritiBanka1204/opencoder-step400 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use KritiBanka1204/opencoder-step400 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("infly/OpenCoder-8B-Instruct") model = PeftModel.from_pretrained(base_model, "KritiBanka1204/opencoder-step400") - Transformers
How to use KritiBanka1204/opencoder-step400 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KritiBanka1204/opencoder-step400") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("KritiBanka1204/opencoder-step400", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KritiBanka1204/opencoder-step400 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KritiBanka1204/opencoder-step400" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KritiBanka1204/opencoder-step400", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KritiBanka1204/opencoder-step400
- SGLang
How to use KritiBanka1204/opencoder-step400 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 "KritiBanka1204/opencoder-step400" \ --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": "KritiBanka1204/opencoder-step400", "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 "KritiBanka1204/opencoder-step400" \ --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": "KritiBanka1204/opencoder-step400", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KritiBanka1204/opencoder-step400 with Docker Model Runner:
docker model run hf.co/KritiBanka1204/opencoder-step400
Download trainer_state.json from KritiBanka1204/opencoder-step400: direct link, hf CLI and curl.
- Browser
- Download file 2.17 kB
-
https://huggingface.co/KritiBanka1204/opencoder-step400/resolve/main/trainer_state.json
- Command line
-
hf download hf://KritiBanka1204/opencoder-step400/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/KritiBanka1204/opencoder-step400/resolve/main/trainer_state.json
2.17 kB
| { | |
| "best_global_step": 400, | |
| "best_metric": 0.5587947964668274, | |
| "best_model_checkpoint": "./opencoder8b_finetuned/checkpoint-400", | |
| "epoch": 1.639344262295082, | |
| "eval_steps": 200, | |
| "global_step": 400, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.4098360655737705, | |
| "grad_norm": 0.2757495045661926, | |
| "learning_rate": 8.114754098360657e-06, | |
| "loss": 1.269, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.819672131147541, | |
| "grad_norm": 0.3459929823875427, | |
| "learning_rate": 9.879146512908832e-06, | |
| "loss": 1.041, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.819672131147541, | |
| "eval_loss": 0.8448625802993774, | |
| "eval_runtime": 200.4789, | |
| "eval_samples_per_second": 4.33, | |
| "eval_steps_per_second": 0.544, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 1.2295081967213115, | |
| "grad_norm": 0.16594329476356506, | |
| "learning_rate": 9.372404789155199e-06, | |
| "loss": 0.708, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 1.639344262295082, | |
| "grad_norm": 0.17427127063274384, | |
| "learning_rate": 8.510154039531063e-06, | |
| "loss": 0.5883, | |
| "step": 400 | |
| }, | |
| { | |
| "epoch": 1.639344262295082, | |
| "eval_loss": 0.5587947964668274, | |
| "eval_runtime": 200.5362, | |
| "eval_samples_per_second": 4.328, | |
| "eval_steps_per_second": 0.544, | |
| "step": 400 | |
| } | |
| ], | |
| "logging_steps": 100, | |
| "max_steps": 1220, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 5, | |
| "save_steps": 400, | |
| "stateful_callbacks": { | |
| "EarlyStoppingCallback": { | |
| "args": { | |
| "early_stopping_patience": 2, | |
| "early_stopping_threshold": 0.0 | |
| }, | |
| "attributes": { | |
| "early_stopping_patience_counter": 0 | |
| } | |
| }, | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 7.36870224949248e+17, | |
| "train_batch_size": 8, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |