Instructions to use KritiBanka1204/opencoder-step976 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use KritiBanka1204/opencoder-step976 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-step976") - Transformers
How to use KritiBanka1204/opencoder-step976 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KritiBanka1204/opencoder-step976") 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-step976", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KritiBanka1204/opencoder-step976 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KritiBanka1204/opencoder-step976" # 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-step976", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KritiBanka1204/opencoder-step976
- SGLang
How to use KritiBanka1204/opencoder-step976 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-step976" \ --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-step976", "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-step976" \ --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-step976", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KritiBanka1204/opencoder-step976 with Docker Model Runner:
docker model run hf.co/KritiBanka1204/opencoder-step976
Download trainer_state.json from KritiBanka1204/opencoder-step976: direct link, hf CLI and curl.
- Browser
- Download file 3.45 kB
-
https://huggingface.co/KritiBanka1204/opencoder-step976/resolve/main/trainer_state.json
- Command line
-
hf download hf://KritiBanka1204/opencoder-step976/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/KritiBanka1204/opencoder-step976/resolve/main/trainer_state.json
3.45 kB
| { | |
| "best_global_step": 800, | |
| "best_metric": 0.4866752028465271, | |
| "best_model_checkpoint": "./opencoder8b_finetuned/checkpoint-800", | |
| "epoch": 4.0, | |
| "eval_steps": 200, | |
| "global_step": 976, | |
| "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 | |
| }, | |
| { | |
| "epoch": 2.0491803278688523, | |
| "grad_norm": 0.17177526652812958, | |
| "learning_rate": 7.3625016623302155e-06, | |
| "loss": 0.5556, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 2.459016393442623, | |
| "grad_norm": 0.26423564553260803, | |
| "learning_rate": 6.022760330631006e-06, | |
| "loss": 0.5291, | |
| "step": 600 | |
| }, | |
| { | |
| "epoch": 2.459016393442623, | |
| "eval_loss": 0.5126457214355469, | |
| "eval_runtime": 199.6781, | |
| "eval_samples_per_second": 4.347, | |
| "eval_steps_per_second": 0.546, | |
| "step": 600 | |
| }, | |
| { | |
| "epoch": 2.8688524590163933, | |
| "grad_norm": 0.23801229894161224, | |
| "learning_rate": 4.599860978031383e-06, | |
| "loss": 0.5239, | |
| "step": 700 | |
| }, | |
| { | |
| "epoch": 3.278688524590164, | |
| "grad_norm": 0.24671746790409088, | |
| "learning_rate": 3.2094959036545057e-06, | |
| "loss": 0.505, | |
| "step": 800 | |
| }, | |
| { | |
| "epoch": 3.278688524590164, | |
| "eval_loss": 0.4866752028465271, | |
| "eval_runtime": 200.7899, | |
| "eval_samples_per_second": 4.323, | |
| "eval_steps_per_second": 0.543, | |
| "step": 800 | |
| }, | |
| { | |
| "epoch": 3.6885245901639343, | |
| "grad_norm": 0.2747114598751068, | |
| "learning_rate": 1.9647121278544996e-06, | |
| "loss": 0.493, | |
| "step": 900 | |
| } | |
| ], | |
| "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": 1.79769386754048e+18, | |
| "train_batch_size": 8, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |