Text Generation
Transformers
PyTorch
Safetensors
English
llama
gpt
llm
large language model
text-generation-inference
Run this model with HF Jobs
Run Kailune-AI/mamba-gpt-3b-v2 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/Kailune-AI/mamba-gpt-3b-v2. 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/Kailune-AI/mamba-gpt-3b-v2 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/Kailune-AI/mamba-gpt-3b-v2. 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/Kailune-AI/mamba-gpt-3b-v2. 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 Kailune-AI/mamba-gpt-3b-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kailune-AI/mamba-gpt-3b-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Kailune-AI/mamba-gpt-3b-v2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Kailune-AI/mamba-gpt-3b-v2") model = AutoModelForCausalLM.from_pretrained("Kailune-AI/mamba-gpt-3b-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Kailune-AI/mamba-gpt-3b-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Kailune-AI/mamba-gpt-3b-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Kailune-AI/mamba-gpt-3b-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Kailune-AI/mamba-gpt-3b-v2
- SGLang
How to use Kailune-AI/mamba-gpt-3b-v2 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 "Kailune-AI/mamba-gpt-3b-v2" \ --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": "Kailune-AI/mamba-gpt-3b-v2", "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 "Kailune-AI/mamba-gpt-3b-v2" \ --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": "Kailune-AI/mamba-gpt-3b-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Kailune-AI/mamba-gpt-3b-v2 with Docker Model Runner:
docker model run hf.co/Kailune-AI/mamba-gpt-3b-v2
chiliu commited on
Commit ·
e54792e
1
Parent(s): 5a5269f
add reference
Browse filesFiles changed (2)
- README.md+13-33
- adapter_config.jsonAdded+21
185 unmodified lines186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224185 unmodified lines)```## EvaluationWe evaluated OpenLLaMA on a wide range of tasks using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness). The LLaMA results are generated by running the original LLaMA model on the same evaluation metrics. We note that our results for the LLaMA model differ slightly from the original LLaMA paper, which we believe is a result of different evaluation protocols. Similar differences have been reported in [this issue of lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness/issues/443). Additionally, we present the results of GPT-J, a 6B parameter model trained on the [Pile](https://pile.eleuther.ai/) dataset by [EleutherAI](https://www.eleuther.ai/).The original LLaMA model was trained for 1 trillion tokens and GPT-J was trained for 500 billion tokens. We present the results in the table below. OpenLLaMA exhibits comparable performance to the original LLaMA and GPT-J across a majority of tasks, and outperforms them in some tasks.| **Task/Metric** | finetuned-GPT 3B | OpenLLaMA 3B || ---------------------- | -------- | ------------ || anli_r1/acc | **0.35** | 0.33 || anli_r2/acc | **0.33** | 0.32 || anli_r3/acc | 0.35 | 0.35 || arc_challenge/acc | **0.35** | 0.34 || arc_challenge/acc_norm | 0.37 | 0.37 || arc_easy/acc | **0.71** | 0.69 || arc_easy/acc_norm | 0.65 | 0.65 || boolq/acc | **0.72** | 0.66 || hellaswag/acc | **0.49** | 0.43 || hellaswag/acc_norm | 0.66 | **0.67** || openbookqa/acc | 0.26 | **0.27** || openbookqa/acc_norm | 0.40 | 0.40 || piqa/acc | **0.76** | 0.75 || piqa/acc_norm | 0.76 | 0.76 || record/em | 0.88 | 0.88 || record/f1 | 0.88 | **0.89** || rte/acc | 0.55 | **0.58** || truthfulqa_mc/mc1 | **0.27** | 0.22 || truthfulqa_mc/mc2 | **0.37** | 0.35 || wic/acc | **0.49** | 0.48 || winogrande/acc | **0.63** | 0.62 || Average | **0.53** | 0.52 |We removed the task CB and WSC from our benchmark, as our model performs suspiciously well on these two tasks. We hypothesize that there could be a benchmark data contamination in the training set.## Disclaimer185 unmodified lines186187188189190191192193194195196197198199200201202203204185 unmodified lines)```## CitationIf this work is helpful, please kindly cite as:```bibtex@Misc{mamba-gpt-3b-v2,title = {Mamba-GPT-3b-v2},author = {chiliu},howpublished = {\url{https://huggingface.co/CobraMamba/mamba-gpt-3b-v2}},year = {2023}}```## Disclaimer
123456789101112131415161718192021{ "auto_mapping": null, "base_model_name_or_path": "openlm-research/open_llama_3b_v2", "bias": "none", "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layers_pattern": null, "layers_to_transform": null, "lora_alpha": 16, "lora_dropout": 0.1, "modules_to_save": null, "peft_type": "LORA", "r": 256, "revision": null, "target_modules": [ "q_proj", "v_proj" ], "task_type": "CAUSAL_LM"}README.md+13-33
adapter_config.jsonAdded+21