Instructions to use Gege24/environment_test_affine-codellama-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Gege24/environment_test_affine-codellama-7b with PEFT:
Base model is not found.
- Transformers
How to use Gege24/environment_test_affine-codellama-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Gege24/environment_test_affine-codellama-7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Gege24/environment_test_affine-codellama-7b", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Gege24/environment_test_affine-codellama-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Gege24/environment_test_affine-codellama-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gege24/environment_test_affine-codellama-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Gege24/environment_test_affine-codellama-7b
- SGLang
How to use Gege24/environment_test_affine-codellama-7b 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 "Gege24/environment_test_affine-codellama-7b" \ --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": "Gege24/environment_test_affine-codellama-7b", "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 "Gege24/environment_test_affine-codellama-7b" \ --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": "Gege24/environment_test_affine-codellama-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Gege24/environment_test_affine-codellama-7b with Docker Model Runner:
docker model run hf.co/Gege24/environment_test_affine-codellama-7b
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.00592, | |
| "eval_steps": 500, | |
| "global_step": 37, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.3875, | |
| "completions/max_length": 512.0, | |
| "completions/max_terminated_length": 333.2, | |
| "completions/mean_length": 232.9, | |
| "completions/mean_terminated_length": 161.20882263183594, | |
| "completions/min_length": 19.0, | |
| "completions/min_terminated_length": 19.0, | |
| "entropy": 0.6788227945566178, | |
| "epoch": 0.0008, | |
| "frac_reward_zero_std": 0.45, | |
| "grad_norm": 1.7250084051184943e-17, | |
| "kl": 0.0, | |
| "learning_rate": 8.529119999999999e-07, | |
| "loss": -3.329563695879303e-17, | |
| "num_tokens": 139158.0, | |
| "reward": 0.006625001598149538, | |
| "reward_std": 0.02386485398747027, | |
| "rewards/env_goofspiel_reward/mean": 0.006625001598149538, | |
| "rewards/env_goofspiel_reward/std": 0.060312052723020315, | |
| "sampling/importance_sampling_ratio/max": 1.5548742481149117e-15, | |
| "sampling/importance_sampling_ratio/mean": 5.537038872768731e-17, | |
| "sampling/importance_sampling_ratio/min": 0.0, | |
| "sampling/sampling_logp_difference/max": 34.56931686401367, | |
| "sampling/sampling_logp_difference/mean": 0.48103601932525636, | |
| "step": 5, | |
| "step_time": 26.902466528200147 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.3625, | |
| "completions/max_length": 512.0, | |
| "completions/max_terminated_length": 380.0, | |
| "completions/mean_length": 208.325, | |
| "completions/mean_terminated_length": 130.9656951904297, | |
| "completions/min_length": 15.6, | |
| "completions/min_terminated_length": 15.6, | |
| "entropy": 0.8194768905639649, | |
| "epoch": 0.0016, | |
| "frac_reward_zero_std": 0.3875, | |
| "grad_norm": 0.0, | |
| "kl": 0.0, | |
| "learning_rate": 1.919052e-06, | |
| "loss": -5.5036242336365485e-21, | |
| "num_tokens": 272885.0, | |
| "reward": -0.001062498986721039, | |
| "reward_std": 0.015114407148212194, | |
| "rewards/env_goofspiel_reward/mean": -0.001062498986721039, | |
| "rewards/env_goofspiel_reward/std": 0.04447857290506363, | |
| "sampling/importance_sampling_ratio/max": 2.6002960348423844e-15, | |
| "sampling/importance_sampling_ratio/mean": 8.147796120515316e-17, | |
| "sampling/importance_sampling_ratio/min": 0.0, | |
| "sampling/sampling_logp_difference/max": 33.71624984741211, | |
| "sampling/sampling_logp_difference/mean": 0.5505338490009308, | |
| "step": 10, | |
| "step_time": 25.23802887940001 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.375, | |
| "completions/max_length": 512.0, | |
| "completions/max_terminated_length": 365.2, | |
| "completions/mean_length": 213.05625, | |
| "completions/mean_terminated_length": 134.1561492919922, | |
| "completions/min_length": 12.0, | |
| "completions/min_terminated_length": 12.0, | |
| "entropy": 0.7374677076935768, | |
| "epoch": 0.0024, | |
| "frac_reward_zero_std": 0.3, | |
| "grad_norm": 6.240696039252212e-21, | |
| "kl": 0.0, | |
| "learning_rate": 2.985192e-06, | |
| "loss": -2.649282052416546e-13, | |
| "num_tokens": 407112.0, | |
| "reward": -0.0010624994523823262, | |
| "reward_std": 0.015467961691319943, | |
| "rewards/env_goofspiel_reward/mean": -0.0010624994523823262, | |
| "rewards/env_goofspiel_reward/std": 0.044856540579348805, | |
| "sampling/importance_sampling_ratio/max": 6.0797169833741606e-12, | |
| "sampling/importance_sampling_ratio/mean": 1.9001603404032331e-13, | |
| "sampling/importance_sampling_ratio/min": 0.0, | |
| "sampling/sampling_logp_difference/max": 33.525834274291995, | |
| "sampling/sampling_logp_difference/mean": 0.5196602582931519, | |
| "step": 15, | |
| "step_time": 25.776172687000233 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.35625, | |
| "completions/max_length": 512.0, | |
| "completions/max_terminated_length": 430.0, | |
| "completions/mean_length": 222.38125, | |
| "completions/mean_terminated_length": 144.48629455566407, | |
| "completions/min_length": 16.0, | |
| "completions/min_terminated_length": 16.0, | |
| "entropy": 0.7416900217533111, | |
| "epoch": 0.0032, | |
| "frac_reward_zero_std": 0.3, | |
| "grad_norm": 0.0, | |
| "kl": 0.0, | |
| "learning_rate": 4.051332e-06, | |
| "loss": 2.170032172889042e-15, | |
| "num_tokens": 543515.0, | |
| "reward": 0.0008125004358589649, | |
| "reward_std": 0.015114407520741224, | |
| "rewards/env_goofspiel_reward/mean": 0.0008125004358589649, | |
| "rewards/env_goofspiel_reward/std": 0.04427960952743888, | |
| "sampling/importance_sampling_ratio/max": 9.7079462209307e-14, | |
| "sampling/importance_sampling_ratio/mean": 3.0337332194254157e-15, | |
| "sampling/importance_sampling_ratio/min": 0.0, | |
| "sampling/sampling_logp_difference/max": 33.49689865112305, | |
| "sampling/sampling_logp_difference/mean": 0.5143256843090057, | |
| "step": 20, | |
| "step_time": 26.41383430980004 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.3875, | |
| "completions/max_length": 480.2, | |
| "completions/max_terminated_length": 350.8, | |
| "completions/mean_length": 206.175, | |
| "completions/mean_terminated_length": 116.13554382324219, | |
| "completions/min_length": 15.2, | |
| "completions/min_terminated_length": 15.2, | |
| "entropy": 0.6977409303188324, | |
| "epoch": 0.004, | |
| "frac_reward_zero_std": 0.2875, | |
| "grad_norm": 2.0909891318276304e-18, | |
| "kl": 0.0, | |
| "learning_rate": 5.117472e-06, | |
| "loss": -5.2856475859179964e-17, | |
| "num_tokens": 680288.0, | |
| "reward": 0.020250003039836883, | |
| "reward_std": 0.044370952248573306, | |
| "rewards/env_goofspiel_reward/mean": 0.020250003039836883, | |
| "rewards/env_goofspiel_reward/std": 0.13559252247214318, | |
| "sampling/importance_sampling_ratio/max": 2.52013723800786e-15, | |
| "sampling/importance_sampling_ratio/mean": 7.877870563254164e-17, | |
| "sampling/importance_sampling_ratio/min": 0.0, | |
| "sampling/sampling_logp_difference/max": 33.450994873046874, | |
| "sampling/sampling_logp_difference/mean": 0.5328368723392487, | |
| "step": 25, | |
| "step_time": 24.940973892599867 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.45625, | |
| "completions/max_length": 512.0, | |
| "completions/max_terminated_length": 404.6, | |
| "completions/mean_length": 238.2375, | |
| "completions/mean_terminated_length": 141.82444915771484, | |
| "completions/min_length": 16.6, | |
| "completions/min_terminated_length": 16.6, | |
| "entropy": 0.6496311470866203, | |
| "epoch": 0.0048, | |
| "frac_reward_zero_std": 0.3, | |
| "grad_norm": 3.2634135614775815e-22, | |
| "kl": 0.0, | |
| "learning_rate": 6.183612e-06, | |
| "loss": 5.1048653439855114e-17, | |
| "num_tokens": 818011.0, | |
| "reward": 0.007000001426786184, | |
| "reward_std": 0.024925515986979008, | |
| "rewards/env_goofspiel_reward/mean": 0.007000001426786184, | |
| "rewards/env_goofspiel_reward/std": 0.05999897662550211, | |
| "sampling/importance_sampling_ratio/max": 4.958355600719433e-15, | |
| "sampling/importance_sampling_ratio/mean": 2.02652089726915e-16, | |
| "sampling/importance_sampling_ratio/min": 0.0, | |
| "sampling/sampling_logp_difference/max": 33.400308227539064, | |
| "sampling/sampling_logp_difference/mean": 0.46320154070854186, | |
| "step": 30, | |
| "step_time": 27.004615230400123 | |
| }, | |
| { | |
| "clip_ratio/high_max": 0.0, | |
| "clip_ratio/high_mean": 0.0, | |
| "clip_ratio/low_mean": 0.0, | |
| "clip_ratio/low_min": 0.0, | |
| "clip_ratio/region_mean": 0.0, | |
| "completions/clipped_ratio": 0.34375, | |
| "completions/max_length": 512.0, | |
| "completions/max_terminated_length": 394.2, | |
| "completions/mean_length": 227.01875, | |
| "completions/mean_terminated_length": 154.02509613037108, | |
| "completions/min_length": 13.8, | |
| "completions/min_terminated_length": 13.8, | |
| "entropy": 0.7401682421565056, | |
| "epoch": 0.0056, | |
| "frac_reward_zero_std": 0.3625, | |
| "grad_norm": 2.2770879894661554e-15, | |
| "kl": 0.0, | |
| "learning_rate": 7.249752e-06, | |
| "loss": 6.233609379277093e-16, | |
| "num_tokens": 955959.0, | |
| "reward": -0.00068749925121665, | |
| "reward_std": 0.014937631692737341, | |
| "rewards/env_goofspiel_reward/mean": -0.00068749925121665, | |
| "rewards/env_goofspiel_reward/std": 0.04448435390368104, | |
| "sampling/importance_sampling_ratio/max": 2.827083637381056e-14, | |
| "sampling/importance_sampling_ratio/mean": 8.835648350382244e-16, | |
| "sampling/importance_sampling_ratio/min": 0.0, | |
| "sampling/sampling_logp_difference/max": 33.62417449951172, | |
| "sampling/sampling_logp_difference/mean": 0.48951873779296873, | |
| "step": 35, | |
| "step_time": 26.58530942660018 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 18750, | |
| "num_input_tokens_seen": 1009125, | |
| "num_train_epochs": 3, | |
| "save_steps": 500, | |
| "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": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |