Instructions to use TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF
- SGLang
How to use TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF 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 "TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF" \ --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": "TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF", "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 "TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF" \ --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": "TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF with Docker Model Runner:
docker model run hf.co/TimeMobius/Mobius-RWKV-Chat-12B-128k-v4-HF
Update README.md
Browse files
README.md
CHANGED
|
@@ -25,4 +25,43 @@ prompt = generate_prompt(text)
|
|
| 25 |
inputs = tokenizer(prompt, return_tensors="pt").to(0)
|
| 26 |
output = model.generate(inputs["input_ids"], max_new_tokens=128, do_sample=True, temperature=1.0, top_p=0.3, top_k=0, )
|
| 27 |
print(tokenizer.decode(output[0].tolist(), skip_special_tokens=True))
|
| 28 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
inputs = tokenizer(prompt, return_tensors="pt").to(0)
|
| 26 |
output = model.generate(inputs["input_ids"], max_new_tokens=128, do_sample=True, temperature=1.0, top_p=0.3, top_k=0, )
|
| 27 |
print(tokenizer.decode(output[0].tolist(), skip_special_tokens=True))
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
# Mobius RWKV 12B v4 version
|
| 31 |
+
Good at Writing and role play, can do some rag.
|
| 32 |
+
|
| 33 |
+
# Mobius Chat 12B 128K
|
| 34 |
+
|
| 35 |
+
## Introduction
|
| 36 |
+
|
| 37 |
+
Mobius is a RWKV v5.2 arch model, a state based RNN+CNN+Transformer Mixed language model pretrained on a certain amount of data.
|
| 38 |
+
In comparison with the previous released Mobius, the improvements include:
|
| 39 |
+
|
| 40 |
+
* Only 24G Vram to run this model locally with fp16;
|
| 41 |
+
* Significant performance improvement;
|
| 42 |
+
* Multilingual support ;
|
| 43 |
+
* Stable support of 128K context length.
|
| 44 |
+
* Base model [Mobius-mega-12B-128k-base](https://huggingface.co/TimeMobius/Moibus-mega-12B-128k-base)
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
## Usage
|
| 48 |
+
We encourage you use few shots to use this model, Desipte Directly use User: xxxx\n\nAssistant: xxx\n\n is really good too, Can boost all potential ability.
|
| 49 |
+
|
| 50 |
+
Recommend Temp and topp: 0.7 0.6/1 0.3/1.5 0.3/0.2 0.8
|
| 51 |
+
|
| 52 |
+
## More details
|
| 53 |
+
Mobius 12B 128k based on RWKV v5.2 arch, which is leading state based RNN+CNN+Transformer Mixed large language model which focus opensouce community
|
| 54 |
+
* 10~100 trainning/inference cost reduce;
|
| 55 |
+
* state based,selected memory, which mean good at grok;
|
| 56 |
+
* community support.
|
| 57 |
+
|
| 58 |
+
## requirements
|
| 59 |
+
24G vram to run fp16, 12G for int8, 6G for nf4 with Ai00 server.
|
| 60 |
+
|
| 61 |
+
* [RWKV Runner](https://github.com/josStorer/RWKV-Runner)
|
| 62 |
+
* [Ai00 server](https://github.com/cgisky1980/ai00_rwkv_server)
|
| 63 |
+
|
| 64 |
+
## future plan
|
| 65 |
+
If you need a HF version let us know
|
| 66 |
+
|
| 67 |
+
[Mobius-Chat-12B-128k](https://huggingface.co/TimeMobius/Mobius-Chat-12B-128k)
|