Text Generation
Transformers
Safetensors
English
llama
nlp
agent
conversational
text-generation-inference
Run this model with HF Jobs
Run xwm/ALFWorld-MPO on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/xwm/ALFWorld-MPO. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/xwm/ALFWorld-MPO on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/xwm/ALFWorld-MPO. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/xwm/ALFWorld-MPO. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use xwm/ALFWorld-MPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xwm/ALFWorld-MPO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xwm/ALFWorld-MPO") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("xwm/ALFWorld-MPO") model = AutoModelForCausalLM.from_pretrained("xwm/ALFWorld-MPO", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use xwm/ALFWorld-MPO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xwm/ALFWorld-MPO" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xwm/ALFWorld-MPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xwm/ALFWorld-MPO
- SGLang
How to use xwm/ALFWorld-MPO 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 "xwm/ALFWorld-MPO" \ --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": "xwm/ALFWorld-MPO", "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 "xwm/ALFWorld-MPO" \ --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": "xwm/ALFWorld-MPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use xwm/ALFWorld-MPO with Docker Model Runner:
docker model run hf.co/xwm/ALFWorld-MPO
Add library_name, robotics tag, Github link
#1
by nielsr HF Staff - opened
1234567891011121314151646 unmodified lines636465---license: apache-2.0tags:- nlp- agentlanguage:- enpipeline_tag: text-generation---# ALFWorld-MPOThis model is a fine-tuned version of Llama-3.1-8B-Instruct on the [alfworld-metaplan-preference-pairs](https://huggingface.co/datasets/xwm/Meta_Plan_Optimization/blob/main/alfworld_metaplan_preference_pairs.json) dataset.It achieves the following results on the evaluation set:- Loss: 0.8390- Rewards/chosen: -0.583646 unmodified lines- Pytorch 2.5.1+cu124- Datasets 3.1.0- Tokenizers 0.20.3123456789101112131415161746 unmodified lines646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280---language:- enlicense: apache-2.0library_name: transformerspipeline_tag: roboticstags:- nlp- agent---# ALFWorld-MPOThis model is a fine-tuned version of Llama-3.1-8B-Instruct on the [alfworld-metaplan-preference-pairs](https://huggingface.co/datasets/xwm/Meta_Plan_Optimization/blob/main/alfworld_metaplan_preference_pairs.json) dataset as described in [MPO: Boosting LLM Agents with Meta Plan Optimization](https://hf.co/papers/2503.02682).It achieves the following results on the evaluation set:- Loss: 0.8390- Rewards/chosen: -0.583646 unmodified lines- Pytorch 2.5.1+cu124- Datasets 3.1.0- Tokenizers 0.20.3## Code[https://github.com/WeiminXiong/MPO](https://github.com/WeiminXiong/MPO)# File informationThe repository contains the following file information:Filename: tokenizer.jsonContent: "Content of the file is larger than 50 KB, too long to display."Filename: all_results.jsonContent: {"epoch": 3.0,"eval_logits/chosen": -0.33491453528404236,"eval_logits/rejected": -0.3404884338378906,"eval_logps/chosen": -12.90090274810791,"eval_logps/rejected": -19.88900375366211,"eval_loss": 0.8390035629272461,"eval_rewards/accuracies": 0.6317567825317383,"eval_rewards/chosen": -0.5836451649665833,"eval_rewards/margins": 0.680999755859375,"eval_rewards/rejected": -1.2646448612213135,"eval_runtime": 29.3135,"eval_samples_per_second": 10.098,"eval_steps_per_second": 2.524,"total_flos": 11469721436160.0,"train_loss": 0.693384567896525,"train_runtime": 1185.9878,"train_samples_per_second": 6.716,"train_steps_per_second": 0.21}Filename: model.safetensors.index.jsonContent: {"metadata": {"total_size": 16060522496},"weight_map": {"lm_head.weight": "model-00004-of-00004.safetensors","model.embed_tokens.weight": "model-00001-of-00004.safetensors","model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors","model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors","model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors","model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors","model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors","model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors","model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors","model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors","model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors","model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors","model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors","model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors","model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors","model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors","model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors","model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors","model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors","model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors","model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors","model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors","model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors","model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors","model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors","model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors","model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors","model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors","model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors","model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors","model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors","model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors","model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors","model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors","model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors","model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors","model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors","model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors","model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors","model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors","model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors","model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors","model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors","model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors","model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors","model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors","model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors","model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors","model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors","model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors","model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors","model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors","model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors","model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors","model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors","model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors","model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors","model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors","model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors","model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors","model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors","model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors","model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors","model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors","model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors","model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors","model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors","model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors","model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors","model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors","model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors","model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors","model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors","model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors","model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors","model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors","model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors","model.layers.18.input_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.18.mlp.down_proj.weight": "model-00003-of-00004.safetensors","model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors","model.layers.18.mlp.up_proj.weight": "model-00003-of-00004.safetensors","model.layers.18.post_attention_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors","model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors","model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors","model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors","model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors","model.layers.19.mlp.gate_proj.weight": "model-00003-of-00004.safetensors","model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors","model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.19.self_attn.k_proj.weight": "model-00003-of-00004.safetensors","model.layers.19.self_attn.o_proj.weight": "model-00003-of-00004.safetensors","model.layers.19.self_attn.q_proj.weight": "model-00003-of-00004.safetensors","model.layers.19.self_attn.v_proj.weight": "model-00003-of-00004.safetensors","model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors","model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors","model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors","model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors","model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors","model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors","model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors","model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors","model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors","model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors","model.layers.20.mlp.gate_proj.weight": "model-00002-of-00004.safetensors","model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors","model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.20.self_attn.k_proj.weight": "model-00002-of-00004.safetensors","model.layers.20.self_attn.o_proj.weight": "model-00002-of-00004.safetensors","model.layers.20.self_attn.q_proj.weight": "model-00002-of-00004.safetensors","model.layers.20.self_attn.v_proj.weight": "model-00002-of-00004.safetensors","model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors","model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors","model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors","model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors","model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors","model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors","model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors","model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors","model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors","model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors","model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors","model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors","model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors","model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors","model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors","model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors","model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors","model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors","model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors","model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors","model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors","model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors","model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors","model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors","model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors","model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors","model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors","model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors","model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors","model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors","model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors","model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors","model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors","model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors","model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors","model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors","model.layers.26.input_layernorm.weight": "model-00003-of-00
README.md+219-4