Instructions to use mjf-su/New-Edge-Critic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mjf-su/New-Edge-Critic with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-VL-4B-Instruct") model = PeftModel.from_pretrained(base_model, "mjf-su/New-Edge-Critic") - Transformers
How to use mjf-su/New-Edge-Critic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mjf-su/New-Edge-Critic") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mjf-su/New-Edge-Critic", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mjf-su/New-Edge-Critic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mjf-su/New-Edge-Critic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mjf-su/New-Edge-Critic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mjf-su/New-Edge-Critic
- SGLang
How to use mjf-su/New-Edge-Critic 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 "mjf-su/New-Edge-Critic" \ --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": "mjf-su/New-Edge-Critic", "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 "mjf-su/New-Edge-Critic" \ --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": "mjf-su/New-Edge-Critic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mjf-su/New-Edge-Critic with Docker Model Runner:
docker model run hf.co/mjf-su/New-Edge-Critic
Upload train_config.json with huggingface_hub
Browse files- train_config.json +34 -0
train_config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"train_dataset": "datasets/Faithfulness-Critic-Dataset/train_dataset.jsonl",
|
| 3 |
+
"val_dataset": "datasets/Faithfulness-Critic-Dataset/val_dataset.jsonl",
|
| 4 |
+
"dataset_dir": "datasets/Faithfulness-Critic-Dataset",
|
| 5 |
+
"max_length": 4096,
|
| 6 |
+
"seed": 0,
|
| 7 |
+
"eval_max_new_tokens": 32,
|
| 8 |
+
"eval_batch_size": 8,
|
| 9 |
+
"eval_steps": 531,
|
| 10 |
+
"scene_oversample_factor": 1.8,
|
| 11 |
+
"e1_oversample_factor": 3.2,
|
| 12 |
+
"base_model": "Qwen/Qwen3-VL-4B-Instruct",
|
| 13 |
+
"use_lora": true,
|
| 14 |
+
"lora_rank": 256,
|
| 15 |
+
"lora_alpha": null,
|
| 16 |
+
"lora_dropout": 0.05,
|
| 17 |
+
"lora_target_modules": "q_proj,k_proj,v_proj,o_proj",
|
| 18 |
+
"flash_attn": false,
|
| 19 |
+
"gradient_checkpointing": false,
|
| 20 |
+
"output_dir": "results/scene-critic-lora",
|
| 21 |
+
"epochs": 2.0,
|
| 22 |
+
"per_device_batch_size": 8,
|
| 23 |
+
"grad_accum_steps": 1,
|
| 24 |
+
"lr": 0.0001,
|
| 25 |
+
"warmup_ratio": 0.03,
|
| 26 |
+
"weight_decay": 0.0,
|
| 27 |
+
"logging_steps": 10,
|
| 28 |
+
"save_steps": 2656,
|
| 29 |
+
"save_total_limit": 2,
|
| 30 |
+
"max_steps": -1,
|
| 31 |
+
"report_to": "wandb",
|
| 32 |
+
"wandb_project": "Faithfulness-Critic",
|
| 33 |
+
"wandb_run_name": "completion-verdict"
|
| 34 |
+
}
|