Text Generation
Transformers
Safetensors
English
lfm2
trl
openenv
harbor
agent
smoldataenvs
grpo
opencode
conversational
Eval Results (legacy)
Instructions to use FineEnvs/LFM2.5-2.6B-opencode-RL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FineEnvs/LFM2.5-2.6B-opencode-RL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FineEnvs/LFM2.5-2.6B-opencode-RL") 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("FineEnvs/LFM2.5-2.6B-opencode-RL") model = AutoModelForCausalLM.from_pretrained("FineEnvs/LFM2.5-2.6B-opencode-RL", 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 FineEnvs/LFM2.5-2.6B-opencode-RL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FineEnvs/LFM2.5-2.6B-opencode-RL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FineEnvs/LFM2.5-2.6B-opencode-RL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FineEnvs/LFM2.5-2.6B-opencode-RL
- SGLang
How to use FineEnvs/LFM2.5-2.6B-opencode-RL 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 "FineEnvs/LFM2.5-2.6B-opencode-RL" \ --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": "FineEnvs/LFM2.5-2.6B-opencode-RL", "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 "FineEnvs/LFM2.5-2.6B-opencode-RL" \ --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": "FineEnvs/LFM2.5-2.6B-opencode-RL", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FineEnvs/LFM2.5-2.6B-opencode-RL with Docker Model Runner:
docker model run hf.co/FineEnvs/LFM2.5-2.6B-opencode-RL
File size: 1,296 Bytes
99b036c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | {
"repo_id": "FineEnvs/LFM2.5-2.6B-opencode-RL",
"revision": "main",
"checkpoint_step": 1000,
"base_model": "LiquidAI/LFM2.5-2.6B",
"base_revision": "654f9463ce32b05d0429d76fe1f580b27d4c1ac0",
"method": "TRL Async GRPO",
"article": "https://huggingface.co/spaces/AdithyaSK/multi-harness-rl",
"training_harnesses": [
"opencode"
],
"files": {
"model.safetensors": {
"sha256": "92edc7f744547a43b3fc3d9ddc05af060c85c9037667264ad9a330aecb229afe",
"bytes": 5394427448
},
"config.json": {
"sha256": "3af87c167083ebf3c699240e0162151ad7ee8872e47558e3d0fe2af363a8aaa2",
"bytes": 1495
},
"generation_config.json": {
"sha256": "127fb60d3ae25548092506e15845d1e754c8b6a443c14c9eb7d16f1249eeb941",
"bytes": 328
},
"tokenizer.json": {
"sha256": "695be7802a0e4b8a81048f0ff5ebb7fc811a0ba5a6be63dbb24deb5a81096f41",
"bytes": 17905598
},
"tokenizer_config.json": {
"sha256": "fe0dad1e6992b02c64988c9834e0cd1b7c0ccb70a5a002e10e27e0f285c96a3e",
"bytes": 364
},
"chat_template.jinja": {
"sha256": "ea663864491de7ade391839479860ca95541f892f72665c73251fbd4643b1bef",
"bytes": 5443
}
},
"tensor_count": 266,
"evaluation_cells": 1000,
"optimizer_state_included": false
}
|