Text Generation
Transformers
Safetensors
llama
llama-factory
conversational
text-generation-inference
Instructions to use RayanNan/dementia with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RayanNan/dementia with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RayanNan/dementia") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RayanNan/dementia") model = AutoModelForCausalLM.from_pretrained("RayanNan/dementia", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RayanNan/dementia with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RayanNan/dementia" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RayanNan/dementia", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RayanNan/dementia
- SGLang
How to use RayanNan/dementia 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 "RayanNan/dementia" \ --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": "RayanNan/dementia", "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 "RayanNan/dementia" \ --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": "RayanNan/dementia", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RayanNan/dementia with Docker Model Runner:
docker model run hf.co/RayanNan/dementia
Commit History
-
Update README.md
Verified signature7b19487
-
Update README.md
Verified signature2e919b8
-
Update README.md
Verified signature3b68b85 -
Upload 2 files
Verified signaturecf25f9c -
Upload 8 files
Verified signature77dcb13 -
Delete tokenizer_config.json
Verified signature0e1a9ca -
Delete tokenizer.model
Verified signature7f130e0 -
Delete tokenizer.json
Verified signaturedf7cdf7 -
Delete special_tokens_map.json
Verified signaturee5433d2 -
Delete generation_config.json
Verified signature860c16f -
Delete config.json
Verified signaturefd9acf1 -
Delete model.safetensors.index.json
Verified signature80b4492 -
Delete README.md
Verified signaturef31fe6b -
Update README.md
Verified signaturebae61d8 -
Update README.md
Verified signature29aaba1 -
Upload 5 files
Verified signaturea4076a0 -
Upload 2 files
Verified signaturedataset for the projectea81239 -
Delete Test.json
Verified signature234270d -
Delete sentiment.json
Verified signatureb312b4b -
Upload 2 files
Verified signaturedatasetb43cada -
Upload generation_config.json
Verified signature6a14e84 -
Upload 6 files
Verified signatureThe models basing on the pre-trained model2920d9d
-
initial commit
Verified signaturec2c2ede