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
| declare(strict_types=1); | |
| /** | |
| * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors | |
| * SPDX-License-Identifier: AGPL-3.0-or-later | |
| */ | |
| namespace OC\Core; | |
| /** | |
| * @psalm-type CoreLoginFlowV2Credentials = array{ | |
| * server: string, | |
| * loginName: string, | |
| * appPassword: string, | |
| * } | |
| * | |
| * @psalm-type CoreLoginFlowV2 = array{ | |
| * poll: array{ | |
| * token: string, | |
| * endpoint: string, | |
| * }, | |
| * login: string, | |
| * } | |
| * | |
| * @psalm-type CoreNavigationEntry = array{ | |
| * id: string, | |
| * order?: int, | |
| * href: string, | |
| * icon: string, | |
| * type: string, | |
| * name: string, | |
| * app?: string, | |
| * default?: bool, | |
| * active: bool, | |
| * classes: string, | |
| * unread: int, | |
| * } | |
| * | |
| * @psalm-type CoreContactsAction = array{ | |
| * title: string, | |
| * icon: string, | |
| * hyperlink: string, | |
| * appId: string, | |
| * } | |
| * | |
| * @psalm-type CoreOpenGraphObject = array{ | |
| * id: string, | |
| * name: string, | |
| * description: ?string, | |
| * thumb: ?string, | |
| * link: string, | |
| * } | |
| * | |
| * @psalm-type CoreResource = array{ | |
| * richObjectType: string, | |
| * richObject: array<string, ?mixed>, | |
| * openGraphObject: CoreOpenGraphObject, | |
| * accessible: bool, | |
| * } | |
| * | |
| * @psalm-type CoreCollection = array{ | |
| * id: int, | |
| * name: string, | |
| * resources: list<CoreResource>, | |
| * } | |
| * | |
| * @psalm-type CoreReference = array{ | |
| * richObjectType: string, | |
| * richObject: array<string, ?mixed>, | |
| * openGraphObject: CoreOpenGraphObject, | |
| * accessible: bool, | |
| * } | |
| * | |
| * @psalm-type CoreReferenceProvider = array{ | |
| * id: string, | |
| * title: string, | |
| * icon_url: string, | |
| * order: int, | |
| * search_providers_ids: ?list<string>, | |
| * } | |
| * | |
| * @psalm-type CoreUnifiedSearchProvider = array{ | |
| * id: string, | |
| * appId: string, | |
| * name: string, | |
| * icon: string, | |
| * order: int, | |
| * isExternalProvider: bool, | |
| * triggers: list<string>, | |
| * filters: array<string, string>, | |
| * inAppSearch: bool, | |
| * } | |
| * | |
| * @psalm-type CoreUnifiedSearchResultEntry = array{ | |
| * thumbnailUrl: string, | |
| * title: string, | |
| * subline: string, | |
| * resourceUrl: string, | |
| * icon: string, | |
| * rounded: bool, | |
| * attributes: list<string>, | |
| * } | |
| * | |
| * @psalm-type CoreUnifiedSearchResult = array{ | |
| * name: string, | |
| * isPaginated: bool, | |
| * entries: list<CoreUnifiedSearchResultEntry>, | |
| * cursor: int|string|null, | |
| * } | |
| * | |
| * @psalm-type CoreAutocompleteResult = array{ | |
| * id: string, | |
| * label: string, | |
| * icon: string, | |
| * source: string, | |
| * status: array{ | |
| * status: string, | |
| * message: ?string, | |
| * icon: ?string, | |
| * clearAt: ?int, | |
| * }|string, | |
| * subline: string, | |
| * shareWithDisplayNameUnique: string, | |
| * } | |
| * | |
| * @psalm-type CoreTextProcessingTask = array{ | |
| * id: ?int, | |
| * type: string, | |
| * status: 0|1|2|3|4, | |
| * userId: ?string, | |
| * appId: string, | |
| * input: string, | |
| * output: ?string, | |
| * identifier: string, | |
| * completionExpectedAt: ?int | |
| * } | |
| * | |
| * @psalm-type CoreTextToImageTask = array{ | |
| * id: ?int, | |
| * status: 0|1|2|3|4, | |
| * userId: ?string, | |
| * appId: string, | |
| * input: string, | |
| * identifier: ?string, | |
| * numberOfImages: int, | |
| * completionExpectedAt: ?int, | |
| * } | |
| * | |
| * @psalm-type CoreTeam = array{ | |
| * teamId: string, | |
| * displayName: string, | |
| * link: ?string, | |
| * } | |
| * | |
| * @psalm-type CoreTeamResource = array{ | |
| * id: string, | |
| * label: string, | |
| * url: string, | |
| * iconSvg: ?string, | |
| * iconURL: ?string, | |
| * iconEmoji: ?string, | |
| * provider: array{ | |
| * id: string, | |
| * name: string, | |
| * icon: string, | |
| * }, | |
| * } | |
| * | |
| * @psalm-type CoreTeamWithResources = CoreTeam&array{ | |
| * resources: list<CoreTeamResource>, | |
| * } | |
| * | |
| * @psalm-type CoreTaskProcessingShape = array{ | |
| * name: string, | |
| * description: string, | |
| * type: "Number"|"Text"|"Audio"|"Image"|"Video"|"File"|"Enum"|"ListOfNumbers"|"ListOfTexts"|"ListOfImages"|"ListOfAudios"|"ListOfVideos"|"ListOfFiles", | |
| * } | |
| * | |
| * @psalm-type CoreTaskProcessingTaskType = array{ | |
| * name: string, | |
| * description: string, | |
| * inputShape: array<string, CoreTaskProcessingShape>, | |
| * inputShapeEnumValues: array<string, list<array{name: string, value: string}>>, | |
| * inputShapeDefaults: array<string, numeric|string>, | |
| * optionalInputShape: array<string, CoreTaskProcessingShape>, | |
| * optionalInputShapeEnumValues: array<string, list<array{name: string, value: string}>>, | |
| * optionalInputShapeDefaults: array<string, numeric|string>, | |
| * outputShape: array<string, CoreTaskProcessingShape>, | |
| * outputShapeEnumValues: array<string, list<array{name: string, value: string}>>, | |
| * optionalOutputShape: array<string, CoreTaskProcessingShape>, | |
| * optionalOutputShapeEnumValues: array<string, list<array{name: string, value: string}>>, | |
| * } | |
| * | |
| * @psalm-type CoreTaskProcessingIO = array<string, numeric|list<numeric>|string|list<string>> | |
| * | |
| * @psalm-type CoreTaskProcessingTask = array{ | |
| * id: int, | |
| * lastUpdated: int, | |
| * type: string, | |
| * status: 'STATUS_CANCELLED'|'STATUS_FAILED'|'STATUS_SUCCESSFUL'|'STATUS_RUNNING'|'STATUS_SCHEDULED'|'STATUS_UNKNOWN', | |
| * userId: ?string, | |
| * appId: string, | |
| * input: CoreTaskProcessingIO, | |
| * output: null|CoreTaskProcessingIO, | |
| * customId: ?string, | |
| * completionExpectedAt: ?int, | |
| * progress: ?float, | |
| * scheduledAt: ?int, | |
| * startedAt: ?int, | |
| * endedAt: ?int, | |
| * allowCleanup: bool, | |
| * includeWatermark: bool, | |
| * userFacingErrorMessage: ?string, | |
| * } | |
| * | |
| * @psalm-type CoreProfileAction = array{ | |
| * id: string, | |
| * icon: string, | |
| * title: string, | |
| * target: ?string, | |
| * } | |
| * | |
| * @psalm-type CoreProfileFields = array{ | |
| * userId: string, | |
| * address?: string|null, | |
| * biography?: string|null, | |
| * displayname?: string|null, | |
| * headline?: string|null, | |
| * isUserAvatarVisible?: bool, | |
| * organisation?: string|null, | |
| * pronouns?: string|null, | |
| * role?: string|null, | |
| * actions: list<CoreProfileAction>, | |
| * } | |
| * | |
| * @psalm-type CoreProfileData = CoreProfileFields&array{ | |
| * // Timezone identifier like Europe/Berlin or America/North_Dakota/Beulah | |
| * timezone: string, | |
| * // Offset in seconds, negative when behind UTC, positive otherwise | |
| * timezoneOffset: int, | |
| * } | |
| * | |
| */ | |
| class ResponseDefinitions { | |
| } | |