Text Generation
Transformers
Safetensors
English
Japanese
Chinese
llama
roleplay
llama3
sillytavern
idol
conversational
text-generation-inference
Instructions to use aifeifei798/llama3-8B-feifei-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aifeifei798/llama3-8B-feifei-1.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aifeifei798/llama3-8B-feifei-1.0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aifeifei798/llama3-8B-feifei-1.0") model = AutoModelForCausalLM.from_pretrained("aifeifei798/llama3-8B-feifei-1.0", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aifeifei798/llama3-8B-feifei-1.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aifeifei798/llama3-8B-feifei-1.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aifeifei798/llama3-8B-feifei-1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/aifeifei798/llama3-8B-feifei-1.0
- SGLang
How to use aifeifei798/llama3-8B-feifei-1.0 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 "aifeifei798/llama3-8B-feifei-1.0" \ --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": "aifeifei798/llama3-8B-feifei-1.0", "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 "aifeifei798/llama3-8B-feifei-1.0" \ --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": "aifeifei798/llama3-8B-feifei-1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use aifeifei798/llama3-8B-feifei-1.0 with Docker Model Runner:
docker model run hf.co/aifeifei798/llama3-8B-feifei-1.0
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,6 +23,16 @@ To create a suitable model for Aifeifei's virtual character, it requires support
|
|
| 23 |
- This model must include a character card; without it, it's really not up to par. :(
|
| 24 |
- How can I customize the name when saving the model with mergekit? I couldn't find it. :(
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
### 模型的由来
|
| 27 |
为了给aifeifei做一个适合她虚拟角色的模型,需要支持角色卡,拟真,中英日文流利,还要有一定的道德标准(这里没怎么测试).所以就做了这个角色卡为主的整合模型
|
| 28 |
### 角色卡
|
|
@@ -31,13 +41,6 @@ To create a suitable model for Aifeifei's virtual character, it requires support
|
|
| 31 |
- 这个模型必须加一个角色卡,要是没有角色卡,真的不咋地:(
|
| 32 |
- mergekit保存模型如何自定义名字?没找到:(
|
| 33 |
|
| 34 |
-
### If you want to use vision functionality:
|
| 35 |
-
* You must use the latest versions of [Koboldcpp](https://github.com/LostRuins/koboldcpp).
|
| 36 |
-
|
| 37 |
-
### To use the multimodal capabilities of this model and use **vision** you need to load the specified **mmproj** file, this can be found inside this model repo. [Llava MMProj](https://huggingface.co/Nitral-AI/Llama-3-Update-3.0-mmproj-model-f16)
|
| 38 |
-
|
| 39 |
-
* You can load the **mmproj** by using the corresponding section in the interface:
|
| 40 |
-

|
| 41 |
---
|
| 42 |
base_model:
|
| 43 |
- hfl/llama-3-chinese-8b-instruct-v3
|
|
|
|
| 23 |
- This model must include a character card; without it, it's really not up to par. :(
|
| 24 |
- How can I customize the name when saving the model with mergekit? I couldn't find it. :(
|
| 25 |
|
| 26 |
+
### If you want to use vision functionality:
|
| 27 |
+
* You must use the latest versions of [Koboldcpp](https://github.com/LostRuins/koboldcpp).
|
| 28 |
+
|
| 29 |
+
### To use the multimodal capabilities of this model and use **vision** you need to load the specified **mmproj** file, this can be found inside this model repo. [Llava MMProj](https://huggingface.co/Nitral-AI/Llama-3-Update-3.0-mmproj-model-f16)
|
| 30 |
+
|
| 31 |
+
* You can load the **mmproj** by using the corresponding section in the interface:
|
| 32 |
+

|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
### 模型的由来
|
| 37 |
为了给aifeifei做一个适合她虚拟角色的模型,需要支持角色卡,拟真,中英日文流利,还要有一定的道德标准(这里没怎么测试).所以就做了这个角色卡为主的整合模型
|
| 38 |
### 角色卡
|
|
|
|
| 41 |
- 这个模型必须加一个角色卡,要是没有角色卡,真的不咋地:(
|
| 42 |
- mergekit保存模型如何自定义名字?没找到:(
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
---
|
| 45 |
base_model:
|
| 46 |
- hfl/llama-3-chinese-8b-instruct-v3
|