Instructions to use finalform/foamQwen2.5-7B-Instruct-Assistant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use finalform/foamQwen2.5-7B-Instruct-Assistant with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct") model = PeftModel.from_pretrained(base_model, "finalform/foamQwen2.5-7B-Instruct-Assistant") - Transformers
How to use finalform/foamQwen2.5-7B-Instruct-Assistant with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="finalform/foamQwen2.5-7B-Instruct-Assistant") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("finalform/foamQwen2.5-7B-Instruct-Assistant", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use finalform/foamQwen2.5-7B-Instruct-Assistant with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "finalform/foamQwen2.5-7B-Instruct-Assistant" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "finalform/foamQwen2.5-7B-Instruct-Assistant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/finalform/foamQwen2.5-7B-Instruct-Assistant
- SGLang
How to use finalform/foamQwen2.5-7B-Instruct-Assistant 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 "finalform/foamQwen2.5-7B-Instruct-Assistant" \ --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": "finalform/foamQwen2.5-7B-Instruct-Assistant", "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 "finalform/foamQwen2.5-7B-Instruct-Assistant" \ --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": "finalform/foamQwen2.5-7B-Instruct-Assistant", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use finalform/foamQwen2.5-7B-Instruct-Assistant with Docker Model Runner:
docker model run hf.co/finalform/foamQwen2.5-7B-Instruct-Assistant
Invalid JSON:Unexpected token 'N', ..."al_loss": NaN,
"... is not valid JSON
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 52, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.1927710843373494, | |
| "grad_norm": 95.26730346679688, | |
| "learning_rate": 0.0004180909090909091, | |
| "loss": 22.4465, | |
| "mean_token_accuracy": 0.08969678990542888, | |
| "num_tokens": 1310720.0, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.3855421686746988, | |
| "grad_norm": 0.0, | |
| "learning_rate": 0.0005103526968014265, | |
| "loss": 0.8012, | |
| "mean_token_accuracy": 0.13804710581898688, | |
| "num_tokens": 2621440.0, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.5783132530120482, | |
| "grad_norm": 0.0, | |
| "learning_rate": 0.0005077286477833616, | |
| "loss": 452.9577, | |
| "mean_token_accuracy": 0.05160275483503938, | |
| "num_tokens": 3932160.0, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.7710843373493976, | |
| "grad_norm": 0.0, | |
| "learning_rate": 0.0005031081504278389, | |
| "loss": 470.5136, | |
| "mean_token_accuracy": 0.03822226445190609, | |
| "num_tokens": 5242880.0, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.963855421686747, | |
| "grad_norm": 26.303752899169922, | |
| "learning_rate": 0.0004965277770447238, | |
| "loss": 167.1384, | |
| "mean_token_accuracy": 0.057517293840646744, | |
| "num_tokens": 6553600.0, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": NaN, | |
| "eval_mean_token_accuracy": 0.13677339731378757, | |
| "eval_num_tokens": 6713344.0, | |
| "eval_runtime": 8.9806, | |
| "eval_samples_per_second": 41.089, | |
| "eval_steps_per_second": 5.233, | |
| "step": 52 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 364, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 7, | |
| "save_steps": 500, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 2.950418957829407e+17, | |
| "train_batch_size": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |