Text Generation
PEFT
Safetensors
Transformers
English
llama
lora
dpo
smollm2
trl
conversational
text-generation-inference
Instructions to use Subject-Emu-5259/NeuralAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Subject-Emu-5259/NeuralAI with PEFT:
Base model is not found.
- Transformers
How to use Subject-Emu-5259/NeuralAI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Subject-Emu-5259/NeuralAI", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Subject-Emu-5259/NeuralAI") model = AutoModelForCausalLM.from_pretrained("Subject-Emu-5259/NeuralAI", 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 Subject-Emu-5259/NeuralAI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Subject-Emu-5259/NeuralAI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Subject-Emu-5259/NeuralAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Subject-Emu-5259/NeuralAI
- SGLang
How to use Subject-Emu-5259/NeuralAI 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 "Subject-Emu-5259/NeuralAI" \ --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": "Subject-Emu-5259/NeuralAI", "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 "Subject-Emu-5259/NeuralAI" \ --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": "Subject-Emu-5259/NeuralAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Subject-Emu-5259/NeuralAI with Docker Model Runner:
docker model run hf.co/Subject-Emu-5259/NeuralAI
| { | |
| "config": { | |
| "vendor-dir": "lib/composer", | |
| "optimize-autoloader": true, | |
| "sort-packages": true, | |
| "platform": { | |
| "php": "8.2" | |
| }, | |
| "allow-plugins": { | |
| "bamarni/composer-bin-plugin": true | |
| } | |
| }, | |
| "autoload": { | |
| "exclude-from-classmap": [ | |
| "**/bamarni/composer-bin-plugin/**" | |
| ], | |
| "files": [ | |
| "lib/public/Log/functions.php" | |
| ], | |
| "psr-4": { | |
| "": "lib/private/legacy", | |
| "OC\\": "lib/private", | |
| "OC\\Core\\": "core/", | |
| "OCP\\": "lib/public", | |
| "NCU\\": "lib/unstable" | |
| } | |
| }, | |
| "require": { | |
| "php": "^8.2", | |
| "ext-apcu": "*", | |
| "ext-ctype": "*", | |
| "ext-curl": "*", | |
| "ext-dom": "*", | |
| "ext-fileinfo": "*", | |
| "ext-gd": "*", | |
| "ext-json": "*", | |
| "ext-libxml": "*", | |
| "ext-mbstring": "*", | |
| "ext-openssl": "*", | |
| "ext-pdo": "*", | |
| "ext-posix": "*", | |
| "ext-session": "*", | |
| "ext-simplexml": "*", | |
| "ext-xml": "*", | |
| "ext-xmlreader": "*", | |
| "ext-xmlwriter": "*", | |
| "ext-zip": "*", | |
| "ext-zlib": "*" | |
| }, | |
| "require-dev": { | |
| "bamarni/composer-bin-plugin": "^1.4" | |
| }, | |
| "scripts": { | |
| "post-install-cmd": [ | |
| "[ $COMPOSER_DEV_MODE -eq 0 ] || composer bin all install", | |
| "composer dump-autoload --no-dev" | |
| ], | |
| "post-update-cmd": [ | |
| "[ $COMPOSER_DEV_MODE -eq 0 ] || composer bin all update --ansi", | |
| "composer dump-autoload --no-dev" | |
| ], | |
| "cs:fix": "php-cs-fixer fix", | |
| "cs:check": "php-cs-fixer fix --dry-run --diff", | |
| "lint": [ | |
| "@lint-8.2-or-earlier", | |
| "@lint-8.3-or-later" | |
| ], | |
| "lint-8.2-or-earlier": "[ $(php -r \"echo PHP_VERSION_ID;\") -ge 80300 ] || find . -type f -name '*.php' -not -path './3rdparty/*' -not -path '*/composer/*' -not -path '*/stubs/*' -not -path '*/vendor-bin/*' -not -path '*/vendor/*' -print0 | xargs -0 -n1 -P$(nproc) php -l", | |
| "lint-8.3-or-later": "[ $(php -r \"echo PHP_VERSION_ID;\") -lt 80300 ] || find . -type f -name '*.php' -not -path './3rdparty/*' -not -path '*/composer/*' -not -path '*/stubs/*' -not -path '*/vendor-bin/*' -not -path '*/vendor/*' -print0 | xargs -0 -n200 -P$(nproc) php -l", | |
| "psalm": "psalm --no-cache --threads=$(nproc)", | |
| "psalm:ocp": "psalm --no-cache --threads=$(nproc) -c psalm-ocp.xml", | |
| "psalm:ncu": "psalm --no-cache --threads=$(nproc) -c psalm-ncu.xml", | |
| "psalm:security": "psalm --no-cache --threads=$(nproc) --taint-analysis --use-baseline=build/psalm-baseline-security.xml", | |
| "psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType", | |
| "psalm:update-baseline": "psalm --no-cache --threads=$(nproc) --update-baseline", | |
| "serve": [ | |
| "Composer\\Config::disableProcessTimeout", | |
| "php -f occ config:system:set 'overwrite.cli.url' --type string --value \"http://${NEXTCLOUD_HOST:=localhost}:${NEXTCLOUD_PORT:=8080}\"", | |
| "PHP_CLI_SERVER_WORKERS=${NEXTCLOUD_WORKERS:=4} php -S ${NEXTCLOUD_HOST:=localhost}:${NEXTCLOUD_PORT:=8080} -t ./" | |
| ], | |
| "test": [ | |
| "Composer\\Config::disableProcessTimeout", | |
| "phpunit --fail-on-warning --fail-on-risky --display-warnings --display-deprecations --display-phpunit-deprecations --colors=always --configuration tests/phpunit-autotest.xml" | |
| ], | |
| "test:db": "@composer run test -- --group DB --group SLOWDB", | |
| "test:files_external": "phpunit --fail-on-warning --fail-on-risky --display-warnings --display-deprecations --display-phpunit-deprecations --colors=always --configuration tests/phpunit-autotest-external.xml", | |
| "rector": "rector --config=build/rector.php && composer cs:fix", | |
| "openapi": "./build/openapi-checker.sh" | |
| }, | |
| "extra": { | |
| "bamarni-bin": { | |
| "bin-links": true, | |
| "forward-command": false | |
| } | |
| } | |
| } | |