Text Generation
Transformers
TensorBoard
Safetensors
llama
Generated from Trainer
axolotl
trl
grpo
unsloth
conversational
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd") model = AutoModelForCausalLM.from_pretrained("apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd", 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 apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd
- SGLang
How to use apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd 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 "apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd" \ --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": "apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd", "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 "apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd" \ --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": "apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd with Docker Model Runner:
docker model run hf.co/apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd
Download last-checkpoint/trainer_state.json from apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd: direct link, hf CLI and curl.
- Browser
- Download file 1.94 kB
-
https://huggingface.co/apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd/resolve/main/last-checkpoint/trainer_state.json
- Command line
-
hf download hf://apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd/last-checkpoint/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/apriasmoro/d178632c-a594-4491-b512-1d1d4fe97fcd/resolve/main/last-checkpoint/trainer_state.json
1.94 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.024691358024691357, | |
| "eval_steps": 1, | |
| "global_step": 1, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.024691358024691357, | |
| "grad_norm": 0.0, | |
| "learning_rate": 0.0, | |
| "loss": 0.0, | |
| "step": 1 | |
| }, | |
| { | |
| "epoch": 0.024691358024691357, | |
| "eval_clip_ratio/high_max": 0.0, | |
| "eval_clip_ratio/high_mean": 0.0, | |
| "eval_clip_ratio/low_mean": 0.0, | |
| "eval_clip_ratio/low_min": 0.0, | |
| "eval_clip_ratio/region_mean": 0.0, | |
| "eval_completions/clipped_ratio": 0.425, | |
| "eval_completions/max_length": 205.0, | |
| "eval_completions/max_terminated_length": 138.6, | |
| "eval_completions/mean_length": 139.95, | |
| "eval_completions/mean_terminated_length": 78.71333465576171, | |
| "eval_completions/min_length": 26.8, | |
| "eval_completions/min_terminated_length": 26.8, | |
| "eval_kl": 0.0, | |
| "eval_loss": -0.020106248557567596, | |
| "eval_num_tokens": 10430.0, | |
| "eval_reward": 0.38962903022766116, | |
| "eval_reward_std": 0.4499048709869385, | |
| "eval_rewards/reward_func_keyword/mean": 0.1, | |
| "eval_rewards/reward_func_keyword/std": 0.10690449476242066, | |
| "eval_runtime": 63.1375, | |
| "eval_samples_per_second": 0.143, | |
| "eval_steps_per_second": 0.032, | |
| "step": 1 | |
| } | |
| ], | |
| "logging_steps": 1, | |
| "max_steps": 1, | |
| "num_input_tokens_seen": 10430, | |
| "num_train_epochs": 1, | |
| "save_steps": 61, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 0.0, | |
| "train_batch_size": 8, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |