Text Generation
PEFT
Safetensors
Transformers
llama
lora
sft
trl
conversational
text-generation-inference
Instructions to use mecoffey/NPC_brain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mecoffey/NPC_brain with PEFT:
Task type is invalid.
- Transformers
How to use mecoffey/NPC_brain with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mecoffey/NPC_brain") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mecoffey/NPC_brain") model = AutoModelForCausalLM.from_pretrained("mecoffey/NPC_brain", 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 mecoffey/NPC_brain with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mecoffey/NPC_brain" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mecoffey/NPC_brain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mecoffey/NPC_brain
- SGLang
How to use mecoffey/NPC_brain 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 "mecoffey/NPC_brain" \ --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": "mecoffey/NPC_brain", "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 "mecoffey/NPC_brain" \ --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": "mecoffey/NPC_brain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mecoffey/NPC_brain with Docker Model Runner:
docker model run hf.co/mecoffey/NPC_brain
finalized param count
Browse files- README.md +6 -20
- adapter_config.json +0 -48
README.md
CHANGED
|
@@ -19,18 +19,11 @@ I have specifically trained it to be the "Brain" of my app for the Build Small H
|
|
| 19 |
|
| 20 |
|
| 21 |
- **Developed by:** mecoffey
|
| 22 |
-
- **Model type:**
|
| 23 |
- **Language:** English
|
| 24 |
- **License:** apache-2.0
|
| 25 |
- **Finetuned from model:** https://huggingface.co/openbmb/MiniCPM5-1B
|
| 26 |
-
|
| 27 |
-
### Model Sources
|
| 28 |
-
|
| 29 |
-
<!-- Provide the basic links for the model. -->
|
| 30 |
-
|
| 31 |
-
- **Repository:** [More Information Needed]
|
| 32 |
-
- **Paper [optional]:** [More Information Needed]
|
| 33 |
-
- **Demo [optional]:** [More Information Needed]
|
| 34 |
|
| 35 |
|
| 36 |
|
|
@@ -38,17 +31,10 @@ I have specifically trained it to be the "Brain" of my app for the Build Small H
|
|
| 38 |
|
| 39 |
This model was trained with the following workflow in mind:
|
| 40 |
|
| 41 |
-
- User prompt
|
| 42 |
-
- User prompt + generated description
|
| 43 |
-
|
| 44 |
-
My exact system prompts and model call are:
|
| 45 |
-
|
| 46 |
-
'''
|
| 47 |
-
ADD CODE HERE
|
| 48 |
-
'''
|
| 49 |
-
|
| 50 |
-
## How to Get Started with the Model
|
| 51 |
|
|
|
|
| 52 |
|
| 53 |
|
| 54 |
## Training Details
|
|
@@ -60,7 +46,7 @@ https://huggingface.co/datasets/mecoffey/npc_dataset
|
|
| 60 |
|
| 61 |
### Compute Infrastructure
|
| 62 |
|
| 63 |
-
Trained with Modal
|
| 64 |
|
| 65 |
## Citation
|
| 66 |
|
|
|
|
| 19 |
|
| 20 |
|
| 21 |
- **Developed by:** mecoffey
|
| 22 |
+
- **Model type:** Causal Language Model
|
| 23 |
- **Language:** English
|
| 24 |
- **License:** apache-2.0
|
| 25 |
- **Finetuned from model:** https://huggingface.co/openbmb/MiniCPM5-1B
|
| 26 |
+
- **Total Parameters after fine-tune** 1,080,632,832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
|
|
|
|
| 31 |
|
| 32 |
This model was trained with the following workflow in mind:
|
| 33 |
|
| 34 |
+
- User prompt = physical description of a fantasy character.
|
| 35 |
+
- User prompt + generated description = a timeline backstory for the character to get to know them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
The user prompt is designed to be short and simple. "something random", "a farmer" "a Half-Orc barkeep with a noticeable scar"
|
| 38 |
|
| 39 |
|
| 40 |
## Training Details
|
|
|
|
| 46 |
|
| 47 |
### Compute Infrastructure
|
| 48 |
|
| 49 |
+
Trained with Modal GPUs
|
| 50 |
|
| 51 |
## Citation
|
| 52 |
|
adapter_config.json
DELETED
|
@@ -1,48 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"alora_invocation_tokens": null,
|
| 3 |
-
"alpha_pattern": {},
|
| 4 |
-
"arrow_config": null,
|
| 5 |
-
"auto_mapping": null,
|
| 6 |
-
"base_model_name_or_path": "openbmb/MiniCPM5-1B",
|
| 7 |
-
"bias": "none",
|
| 8 |
-
"corda_config": null,
|
| 9 |
-
"ensure_weight_tying": false,
|
| 10 |
-
"eva_config": null,
|
| 11 |
-
"exclude_modules": null,
|
| 12 |
-
"fan_in_fan_out": false,
|
| 13 |
-
"inference_mode": true,
|
| 14 |
-
"init_lora_weights": true,
|
| 15 |
-
"layer_replication": null,
|
| 16 |
-
"layers_pattern": null,
|
| 17 |
-
"layers_to_transform": null,
|
| 18 |
-
"loftq_config": {},
|
| 19 |
-
"lora_alpha": 32,
|
| 20 |
-
"lora_bias": false,
|
| 21 |
-
"lora_dropout": 0.05,
|
| 22 |
-
"lora_ga_config": null,
|
| 23 |
-
"megatron_config": null,
|
| 24 |
-
"megatron_core": "megatron.core",
|
| 25 |
-
"modules_to_save": null,
|
| 26 |
-
"peft_type": "LORA",
|
| 27 |
-
"peft_version": "0.19.1",
|
| 28 |
-
"qalora_group_size": 16,
|
| 29 |
-
"r": 16,
|
| 30 |
-
"rank_pattern": {},
|
| 31 |
-
"revision": null,
|
| 32 |
-
"target_modules": [
|
| 33 |
-
"up_proj",
|
| 34 |
-
"q_proj",
|
| 35 |
-
"down_proj",
|
| 36 |
-
"v_proj",
|
| 37 |
-
"k_proj",
|
| 38 |
-
"gate_proj",
|
| 39 |
-
"o_proj"
|
| 40 |
-
],
|
| 41 |
-
"target_parameters": null,
|
| 42 |
-
"task_type": "CAUSAL_LM",
|
| 43 |
-
"trainable_token_indices": null,
|
| 44 |
-
"use_bdlora": null,
|
| 45 |
-
"use_dora": false,
|
| 46 |
-
"use_qalora": false,
|
| 47 |
-
"use_rslora": false
|
| 48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|