Text Generation
Transformers
Safetensors
English
mistral
Merge
mergekit
lazymergekit
quantized
4-bit precision
AWQ
chatml
Eval Results (legacy)
text-generation-inference
awq
Run this model with HF Jobs
Run solidrust/Monarch-7B-AWQ 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/solidrust/Monarch-7B-AWQ. 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/solidrust/Monarch-7B-AWQ 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/solidrust/Monarch-7B-AWQ. 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.
Instructions to use solidrust/Monarch-7B-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use solidrust/Monarch-7B-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="solidrust/Monarch-7B-AWQ")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("solidrust/Monarch-7B-AWQ") model = AutoModelForCausalLM.from_pretrained("solidrust/Monarch-7B-AWQ", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use solidrust/Monarch-7B-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "solidrust/Monarch-7B-AWQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "solidrust/Monarch-7B-AWQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/solidrust/Monarch-7B-AWQ
- SGLang
How to use solidrust/Monarch-7B-AWQ 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 "solidrust/Monarch-7B-AWQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "solidrust/Monarch-7B-AWQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "solidrust/Monarch-7B-AWQ" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "solidrust/Monarch-7B-AWQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use solidrust/Monarch-7B-AWQ with Docker Model Runner:
docker model run hf.co/solidrust/Monarch-7B-AWQ
add model card
Browse files123---license: apache-2.0---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228---license: cc-by-nc-4.0tags:- merge- mergekit- lazymergekit- quantized- 4-bit- AWQ- text-generation- autotrain_compatible- endpoints_compatible- chatmlbase_model:- mlabonne/OmniTruthyBeagle-7B-v0- mlabonne/NeuBeagle-7B- mlabonne/NeuralOmniBeagle-7Bmodel-index:- name: Monarch-7Bresults:- task:type: text-generationname: Text Generationdataset:name: AI2 Reasoning Challenge (25-Shot)type: ai2_arcconfig: ARC-Challengesplit: testargs:num_few_shot: 25metrics:- type: acc_normvalue: 73.04name: normalized accuracysource:url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7Bname: Open LLM Leaderboard- task:type: text-generationname: Text Generationdataset:name: HellaSwag (10-Shot)type: hellaswagsplit: validationargs:num_few_shot: 10metrics:- type: acc_normvalue: 89.03name: normalized accuracysource:url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7Bname: Open LLM Leaderboard- task:type: text-generationname: Text Generationdataset:name: MMLU (5-Shot)type: cais/mmluconfig: allsplit: testargs:num_few_shot: 5metrics:- type: accvalue: 64.41name: accuracysource:url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7Bname: Open LLM Leaderboard- task:type: text-generationname: Text Generationdataset:name: TruthfulQA (0-shot)type: truthful_qaconfig: multiple_choicesplit: validationargs:num_few_shot: 0metrics:- type: mc2value: 77.35source:url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7Bname: Open LLM Leaderboard- task:type: text-generationname: Text Generationdataset:name: Winogrande (5-shot)type: winograndeconfig: winogrande_xlsplit: validationargs:num_few_shot: 5metrics:- type: accvalue: 84.61name: accuracysource:url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7Bname: Open LLM Leaderboard- task:type: text-generationname: Text Generationdataset:name: GSM8k (5-shot)type: gsm8kconfig: mainsplit: testargs:num_few_shot: 5metrics:- type: accvalue: 69.07name: accuracysource:url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=mlabonne/Monarch-7Bname: Open LLM Leaderboardlibrary_name: transformerslanguage:- enmodel_creator: mlabonnemodel_name: Darewin-7Bmodel_type: mistralpipeline_tag: text-generationinference: falseprompt_template: '<|im_start|>system{system_message}<|im_end|><|im_start|>user{prompt}<|im_end|><|im_start|>assistant'quantized_by: Suparious---# mlabonne/Monarch-7B AWQ- Model creator: [mlabonne](https://huggingface.co/mlabonne)- Original model: [Monarch-7B](https://huggingface.co/mlabonne/Monarch-7B)## Model Summary**Update 13/02/24: Monarch-7B is the best-performing model on the YALL leaderboard.**Monarch-7B is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):* [mlabonne/OmniTruthyBeagle-7B-v0](https://huggingface.co/mlabonne/OmniTruthyBeagle-7B-v0)* [mlabonne/NeuBeagle-7B](https://huggingface.co/mlabonne/NeuBeagle-7B)* [mlabonne/NeuralOmniBeagle-7B](https://huggingface.co/mlabonne/NeuralOmniBeagle-7B)## How to use### Install the necessary packages```bashpip install --upgrade autoawq autoawq-kernels```### Example Python code```pythonfrom awq import AutoAWQForCausalLMfrom transformers import AutoTokenizer, TextStreamermodel_path = "solidrust/Monarch-7B-AWQ"system_message = "You are Darewin, incarnated as a powerful AI."# Load modelmodel = AutoAWQForCausalLM.from_quantized(model_path,fuse_layers=True)tokenizer = AutoTokenizer.from_pretrained(model_path,trust_remote_code=True)streamer = TextStreamer(tokenizer,skip_prompt=True,skip_special_tokens=True)# Convert prompt to tokensprompt_template = """\<|im_start|>system{system_message}<|im_end|><|im_start|>user{prompt}<|im_end|><|im_start|>assistant"""prompt = "You're standing on the surface of the Earth. "\"You walk one mile south, one mile west and one mile north. "\"You end up exactly where you started. Where are you?"tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),return_tensors='pt').input_ids.cuda()# Generate outputgeneration_output = model.generate(tokens,streamer=streamer,max_new_tokens=512)```### About AWQAWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.It is supported by:- [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ- [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)- [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code## Prompt template: ChatML```plaintext<|im_start|>system{system_message}<|im_end|><|im_start|>user{prompt}<|im_end|><|im_start|>assistant```
README.md+226-1