Text Generation
Transformers
Safetensors
qwen2
soup-cli
fine-tuned
full-model
conversational
text-generation-inference
Instructions to use wakeelypro/wakeelypro-jordanian-law with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wakeelypro/wakeelypro-jordanian-law with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wakeelypro/wakeelypro-jordanian-law") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("wakeelypro/wakeelypro-jordanian-law") model = AutoModelForCausalLM.from_pretrained("wakeelypro/wakeelypro-jordanian-law", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wakeelypro/wakeelypro-jordanian-law with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wakeelypro/wakeelypro-jordanian-law" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wakeelypro/wakeelypro-jordanian-law", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wakeelypro/wakeelypro-jordanian-law
- SGLang
How to use wakeelypro/wakeelypro-jordanian-law 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 "wakeelypro/wakeelypro-jordanian-law" \ --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": "wakeelypro/wakeelypro-jordanian-law", "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 "wakeelypro/wakeelypro-jordanian-law" \ --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": "wakeelypro/wakeelypro-jordanian-law", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use wakeelypro/wakeelypro-jordanian-law with Docker Model Runner:
docker model run hf.co/wakeelypro/wakeelypro-jordanian-law
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 3.0, | |
| "eval_steps": 500, | |
| "global_step": 90, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "entropy": 2.6962053060531614, | |
| "epoch": 0.3389830508474576, | |
| "grad_norm": 5.6875, | |
| "learning_rate": 1.9689373017815076e-05, | |
| "loss": 2.622, | |
| "mean_token_accuracy": 0.4749481610953808, | |
| "num_tokens": 5419.0, | |
| "step": 10 | |
| }, | |
| { | |
| "entropy": 2.698164188861847, | |
| "epoch": 0.6779661016949152, | |
| "grad_norm": 3.328125, | |
| "learning_rate": 1.8214207751204917e-05, | |
| "loss": 2.4606, | |
| "mean_token_accuracy": 0.49576075151562693, | |
| "num_tokens": 11175.0, | |
| "step": 20 | |
| }, | |
| { | |
| "entropy": 2.676299622184352, | |
| "epoch": 1.0, | |
| "grad_norm": 2.640625, | |
| "learning_rate": 1.5703226369349642e-05, | |
| "loss": 2.3682, | |
| "mean_token_accuracy": 0.49295464863902644, | |
| "num_tokens": 16450.0, | |
| "step": 30 | |
| }, | |
| { | |
| "entropy": 2.69452788233757, | |
| "epoch": 1.3389830508474576, | |
| "grad_norm": 1.8828125, | |
| "learning_rate": 1.2473065005542155e-05, | |
| "loss": 2.2639, | |
| "mean_token_accuracy": 0.5272781491279602, | |
| "num_tokens": 22083.0, | |
| "step": 40 | |
| }, | |
| { | |
| "entropy": 2.6724473893642426, | |
| "epoch": 1.6779661016949152, | |
| "grad_norm": 2.046875, | |
| "learning_rate": 8.931048784348875e-06, | |
| "loss": 2.318, | |
| "mean_token_accuracy": 0.5053238138556481, | |
| "num_tokens": 27625.0, | |
| "step": 50 | |
| }, | |
| { | |
| "entropy": 2.72734388552214, | |
| "epoch": 2.0, | |
| "grad_norm": 2.5625, | |
| "learning_rate": 5.523827899372876e-06, | |
| "loss": 2.3562, | |
| "mean_token_accuracy": 0.5088289270275518, | |
| "num_tokens": 32900.0, | |
| "step": 60 | |
| }, | |
| { | |
| "entropy": 2.6972490429878233, | |
| "epoch": 2.3389830508474576, | |
| "grad_norm": 1.9609375, | |
| "learning_rate": 2.681054778182748e-06, | |
| "loss": 2.3019, | |
| "mean_token_accuracy": 0.5131353832781315, | |
| "num_tokens": 38497.0, | |
| "step": 70 | |
| }, | |
| { | |
| "entropy": 2.6893122375011442, | |
| "epoch": 2.6779661016949152, | |
| "grad_norm": 1.984375, | |
| "learning_rate": 7.612046748871327e-07, | |
| "loss": 2.2939, | |
| "mean_token_accuracy": 0.520061531662941, | |
| "num_tokens": 44003.0, | |
| "step": 80 | |
| }, | |
| { | |
| "entropy": 2.6991821401997615, | |
| "epoch": 3.0, | |
| "grad_norm": 2.875, | |
| "learning_rate": 6.371743430082511e-09, | |
| "loss": 2.2783, | |
| "mean_token_accuracy": 0.5276820785120914, | |
| "num_tokens": 49350.0, | |
| "step": 90 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 90, | |
| "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": 847960927833600.0, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |