Instructions to use Dev-the-dev91/syllabus-extractor-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Dev-the-dev91/syllabus-extractor-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "Dev-the-dev91/syllabus-extractor-lora") - Transformers
How to use Dev-the-dev91/syllabus-extractor-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Dev-the-dev91/syllabus-extractor-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Dev-the-dev91/syllabus-extractor-lora", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Dev-the-dev91/syllabus-extractor-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Dev-the-dev91/syllabus-extractor-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Dev-the-dev91/syllabus-extractor-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Dev-the-dev91/syllabus-extractor-lora
- SGLang
How to use Dev-the-dev91/syllabus-extractor-lora 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 "Dev-the-dev91/syllabus-extractor-lora" \ --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": "Dev-the-dev91/syllabus-extractor-lora", "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 "Dev-the-dev91/syllabus-extractor-lora" \ --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": "Dev-the-dev91/syllabus-extractor-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Dev-the-dev91/syllabus-extractor-lora with Docker Model Runner:
docker model run hf.co/Dev-the-dev91/syllabus-extractor-lora
Invalid JSON:Unexpected token 'N', ..."al_loss": NaN,
"... is not valid JSON
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 3.0, | |
| "eval_steps": 100, | |
| "global_step": 33, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "entropy": 0.17733469381928443, | |
| "epoch": 0.9876543209876543, | |
| "grad_norm": 1.6561490297317505, | |
| "learning_rate": 7.500000000000001e-05, | |
| "loss": 19.02234802246094, | |
| "mean_token_accuracy": 0.09697876162827015, | |
| "num_tokens": 162113.0, | |
| "step": 10 | |
| }, | |
| { | |
| "entropy": 0.1562326379018287, | |
| "epoch": 1.8888888888888888, | |
| "grad_norm": 0.4980040490627289, | |
| "learning_rate": 4.375e-05, | |
| "loss": 12.02085189819336, | |
| "mean_token_accuracy": 0.09252177444222855, | |
| "num_tokens": 309890.0, | |
| "step": 20 | |
| }, | |
| { | |
| "entropy": 0.21534234203704417, | |
| "epoch": 2.7901234567901234, | |
| "grad_norm": 0.6889352202415466, | |
| "learning_rate": 1.25e-05, | |
| "loss": 1.2283188819885253, | |
| "mean_token_accuracy": 0.0909152039109844, | |
| "num_tokens": 458756.0, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "eval_entropy": 0.09051553408304851, | |
| "eval_loss": NaN, | |
| "eval_mean_token_accuracy": 0.0862596763504876, | |
| "eval_num_tokens": 492483.0, | |
| "eval_runtime": 10.3363, | |
| "eval_samples_per_second": 0.871, | |
| "eval_steps_per_second": 0.871, | |
| "step": 33 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 33, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 3, | |
| "save_steps": 100, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 1060747676575488.0, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |